Orientation selectivity is a key property of primary visual cortex that contributes, downstream, to object recognition. The origin of orientation selectivity, however, has been debated for decades. It is known that on- and off-centre subcortical pathways converge onto single neurons in primary visual cortex, and that the spatial offset between these pathways gives rise to orientation selectivity. On- and off-centre pathways are intermingled, however, so it is unclear how their inputs to cortex come to be spatially segregated. We here describe a model in which the segregation occurs through Hebbian strengthening and weakening of geniculocortical synapses during the development of the visual system. Our findings include the following. 1. Neighbouring on- and off-inputs to cortex largely cancelled each other at the start of development. At each receptive field location, the Hebbian process increased the strength of one input sign at the expense of the other sign, producing a spatial segregation of on- and off-inputs. 2. The resulting orientation selectivity was precise in that the bandwidths of the orientation tuning functions fell within empirical estimates. 3. The model produced maps of preferred orientation-complete with iso-orientation domains and pinwheels-similar to those found in real cortex. 4. These maps did not originate in cortical processes, but from clustering of off-centre subcortical pathways and the relative location of neighbouring on-centre clusters. We conclude that a model with intermingled on- and off-pathways shaped by Hebbian synaptic plasticity can explain both the origin and development of orientation selectivity.