Sensory experience in early postnatal life shapes neuronal connections in the brain. Here we report that the local synthesis of brain-derived neurotrophic factor (BDNF) in dendrites plays an important role in this process. We found that dendritic spines of layer 2/3 pyramidal neurons of the visual cortex in mutant mice lacking dendritic Bdnf mRNA and thus local BDNF synthesis were normal at 3 weeks of age, but thinner, longer, and more closely spaced (morphological features of immaturity) at 4 months of age than in wild-type (WT) littermates. Layer 2/3 of the visual cortex in these mutant animals also had fewer GABAergic presynaptic terminals at both ages. The overall size and shape of dendritic arbors were, however, similar in mutant and WT mice at both ages. By using optical imaging of intrinsic signals and single-unit recordings, we found that mutant animals failed to recover cortical responsiveness following monocular deprivation (MD) during the critical period, although they displayed normally the competitive loss of responsiveness to an eye briefly deprived of vision. Furthermore, MD still induced a loss of responsiveness to the closed eye in adult mutant mice, but not in adult WT mice. These results indicate that dendritic BDNF synthesis is required for spine pruning, late-phase spine maturation, and recovery of cortical responsiveness following sensory deprivation. They also suggest that maturation of dendritic spines is required for the maintenance of cortical responsiveness following sensory deprivation in adulthood.