The locus coeruleus (LC) plays a paradoxical role in chronic pain. Although largely known as a potent source of endogenous analgesia, increasing evidence suggests injury can transform the LC into a chronic pain generator. We sought to clarify the role of this system in pain. Here, we show optogenetic inhibition of LC activity is acutely antinociceptive. Following long-term spared nerve injury, the same LC inhibition is analgesic, further supporting its pain generator function. To identify inhibitory substrates that may naturally serve this function, we turned to endogenous LC mu opioid receptors (LC-MOR). These receptors provide powerful LC inhibition and exogenous activation of LC-MOR is antinociceptive. We therefore hypothesized that endogenous LC-MOR-mediated inhibition is critical to how the LC modulates pain. Using cell type-selective conditional knockout and rescue of LC-MOR receptor signaling, we show these receptors bidirectionally regulate thermal and mechanical hyperalgesia, providing a functional gate on the LC pain generator.