Functional circuits in the adult neocortex adjust to novel sensory experience, but the underlying synaptic mechanisms remain unknown. Growth and retraction of dendritic spines with synapse formation and elimination could change brain circuits. In the apical tufts of layer 5B (L5B) pyramidal neurons in the mouse barrel cortex, a subset of dendritic spines appear and disappear over days, whereas most spines are persistent for months. Under baseline conditions, new spines are mostly transient and rarely survive for more than a week. Transient spines tend to be small, whereas persistent spines are usually large. Because most excitatory synapses in the cortex occur on spines, and because synapse size and the number of alpha-amino-3-hydroxy-5-methyl-4-isoxazole propionic acid (AMPA) receptors are proportional to spine volume, the excitation of pyramidal neurons is probably driven through synapses on persistent spines. Here we test whether the generation and loss of persistent spines are enhanced by novel sensory experience. We repeatedly imaged dendritic spines for one month after trimming alternate whiskers, a paradigm that induces adaptive functional changes in neocortical circuits. Whisker trimming stabilized new spines and destabilized previously persistent spines. New-persistent spines always formed synapses. They were preferentially added on L5B neurons with complex apical tufts rather than simple tufts. Our data indicate that novel sensory experience drives the stabilization of new spines on subclasses of cortical neurons. These synaptic changes probably underlie experience-dependent remodelling of specific neocortical circuits.