Orexin neuropeptides carry out important neuromodulatory functions in the brain, yet tools to precisely control the activation of endogenous orexin signaling are lacking. Here, we developed a photocaged orexin-B (photo-OXB) through a C-terminal photocaging strategy. We show that photo-OXB is unable to activate its cognate receptors in the dark but releases functionally active native orexin-B upon uncaging by illumination with UV-visible (UV-vis) light (370–405 nm). We established an all-optical assay combining photo-OXB with a genetically encoded orexin biosensor and used it to characterize the efficiency and spatial profile of photo-OXB uncaging. Finally, we demonstrated that photo-OXB enables optical control over orexin signaling with fine temporal precision both in vitro and ex vivo. Thus, our photocaging strategy and photo-OXB advance the chemical biological toolkit by introducing a method for the optical control of peptide signaling and physiological function.