Recent advances in two-photon microscopy and fluorescence labeling techniques have enabled us to directly see the structural and functional changes in neurons and glia, and even at synapses, in the brain of living animals. Long-termin vivotwo-photon imaging studies have shown that some postsynaptic dendritic spines in the adult cortex are rapidly eliminated or newly generated, in response to altered sensory input or synaptic activity, resulting in experience/activity-dependent rewiring of neuronal circuits.In vivoCa2+imaging studies have revealed the distinct, input-specific response patterns of excitatory neurons in the brain. These updatedin vivoapproaches are just beginning to be used for the study of pathophysiological mechanisms of chronic diseases. In this paper, we introduce recentin vivotwo-photon imaging studies demonstrating how plastic changes in synaptic structure and function of the mouse somatosensory cortex, following peripheral injury, contribute to chronic pain conditions, like neuropathic and inflammatory pain.