Two-photon (2P) uncaging of caged neurotransmitters can efficiently stimulate individual synapses and is widely used to characterize synaptic functions in brain slice preparations. Here we extended 2P uncaging to neocortical pyramidal neurons in adult mice in vivo where caged glutamate was applied from the pial surface. To validate the methodology, we applied a small fluorescent probe using the same method, and confirmed that its concentrations were approximately homogenous up to 200 μm below the cortical surface, and that the extracellular space of the neocortex was as large as 22%. In fact, in vivo whole-cell recording revealed that 2P glutamate uncaging could elicit transient currents (2pEPSCs) very similar to excitatory postsynaptic currents (EPSCs). A spatial resolution of glutamate uncaging was 0.6-0.8 μm up to the depth of 200 μm, and in vivo 2P uncaging was able to stimulate single identified spines. Automated three-dimensional (3-D) mapping of such 2pEPSCs which covered the surfaces of dendritic branches revealed that functional AMPA receptor expression was stable and proportional to spine volume. Moreover, in vivo 2P Ca2+ imaging and uncaging suggested that the amplitudes of glutamate-induced Ca2+ transients were inversely proportional to spine volume. Thus, the key structure-function relationships hold in dendritic spines in adult neocortex in vivo, as in young hippocampal slice preparations. In vivo 2P uncaging will be a powerful tool to investigate properties of synapses in the neocortex.