Hypothalamic orexin (hypocretin) neurons play crucial roles in arousal control. Their involvement in anesthesia and analgesia remains to be better understood. In order to enhance our view on the neuroanatomy, we systematically mapped the projections of orexin neurons with confocal microscope and light sheet microscope. We specifically expressed optogenetic opsins tagged with fluorescence markers in orexin neurons through adeno-associated viral infection in the mouse brain. The imaging results revealed fine details and novel features of the orexin projections throughout the brain, particularly related to the nuclei regulating arousal and pain. We then optogenetically activated orexin neurons in the lateral hypothalamus to study the effects on anesthesia-related behaviors. cFos staining showed that optogenetic stimulation can activate orexin neurons in the ChR2-mCherry group, but not the control mCherry group (62.86 ± 3.923% vs. 7.9 ± 2.072%; < 0.0001). In behavior assays, optogenetic stimulation in the ChR2-mCherry group consistently elicited robust arousal from light isoflurane anesthesia (9.429 ± 3.804 s vs. 238.2 ± 17.42 s; < 0.0001), shortened the emergence time after deep isoflurane anesthesia (109.5 ± 13.59 s vs. 213.8 ± 21.77 s; = 0.0023), and increased the paw withdrawal latency in a hotplate test (11.45 ± 1.185 s vs. 8.767 ± 0.7775; = 0.0317). The structural details of orexin fibers established the neuroanatomic basis for studying the role of orexin in anesthesia and analgesia.