The mammalian motor cortex is capable of circuit reorganization driven by acquisition of novel motor skills. Time-lapse imaging of synaptic structures in the living brain provides valuable information on how motor learning rewires synaptic connections and how long-lasting memory is structurally encoded in the intact brain. Here we introduce a transcranial imaging protocol using two-photon laser scanning microscopy to follow fluorescently labeled postsynaptic dendritic spines in vivo. This protocol utilizes a thinned-skull preparation, which allows repetitive imaging of the same synapses over various intervals ranging from hours to years. Furthermore, intracortical microstimulation is performed at the end of repetitive imaging to confirm that images are taken from functionally responsive regions in the motor cortex.