The mammalian cerebral cortex is typically organized in six layers containing multiple types of neurons, with pyramidal neurons (PNs) being the most abundant. PNs in different cortical layers have distinct morphology, physiology and functional roles in neural circuits. Therefore, their development and synaptic plasticity may also differ. Using in vivo transcranial two-photon microscopy, we followed the structural dynamics of dendritic spines on apical dendrites of layer (L) 2/3 and L5 PNs at different developmental stages. We show that the density and dynamics of spines are significantly higher in L2/3 PNs than L5 PNs in both adolescent (1 month old) and adult (4 months old) mice. While spine density of L5 PNs decreases during adolescent development due to a higher rate of spine elimination than formation, there is no net change in the spine density along apical dendrites of L2/3 PNs over this period. In addition, experiences exert differential impact on the dynamics of apical dendritic spines of PNs resided in different cortical layers. While motor skill learning promotes spine turnover on L5 PNs in the motor cortex, it does not change the spine dynamics on L2/3 PNs. In addition, neonatal sensory deprivation decreases the spine density of both L2/3 and L5 PNs, but leads to opposite changes in spine dynamics among these two populations of neurons in adolescence. In summary, our data reveal distinct dynamics and plasticity of apical dendritic spines on PNs in different layers in the living mouse cortex, which may arise from their distinct functional roles in cortical circuits.