We report a novel model in which remote activation of peripheral nociceptive pathways in transgenic mice is achieved optogenetically, without any external noxious stimulus or injury. Taking advantage of a binary genetic approach, we selectively targeted Nav1.8(+) sensory neurons for conditional expression of channelrhodopsin-2 (ChR2) channels. Acute blue light illumination of the skin produced robust nocifensive behaviors, evoked by the remote stimulation of both peptidergic and nonpeptidergic nociceptive fibers as indicated by c-Fos labeling in laminae I and II of the dorsal horn of the spinal cord. A non-nociceptive component also contributes to the observed behaviors, as shown by c-Fos expression in lamina III of the dorsal horn and the expression of ChR2-EYFP in a subpopulation of large-diameter Nav1.8(+) dorsal root ganglion neurons. Selective activation of Nav1.8(+) afferents in vivo induced central sensitization and conditioned place aversion, thus providing a novel paradigm to investigate plasticity in the pain circuitry. Long-term potentiation was similarly evoked by light activation of the same afferents in isolated spinal cord preparations. These findings demonstrate, for the first time, the optical control of nociception and central sensitization in behaving mammals and enables selective activation of the same class of afferents in both in vivo and ex vivo preparations. Our results provide a proof-of-concept demonstration that optical dissection of the contribution of specific classes of afferents to central sensitization is possible. The high spatiotemporal precision offered by this non-invasive model will facilitate drug development and target validation for pain therapeutics.