Neuronal activity is important for the functional refinement of neuronal circuits in the early visual system. At the level of the cerebral cortex, however, it is still unknown whether the formation of fundamental functions such as orientation selectivity depends on neuronal activity, as it has been difficult to suppress activity throughout development. Using genetic silencing of cortical activity starting before the formation of orientation selectivity, we found that the orientation selectivity of neurons in the mouse visual cortex formed and matured normally despite a strong suppression of both spontaneous and visually evoked activity throughout development. After the orientation selectivity formed, the distribution of the preferred orientations of neurons was reorganized. We found that this process required spontaneous activity, but not visually evoked activity. Thus, the initial formation and maturation of orientation selectivity is largely independent of neuronal activity, and the initial selectivity is subsequently modified depending on neuronal activity.