A major unresolved issue in treating pain is the paradoxical hyperalgesia produced by the gold-standard analgesic morphine and other opioids. Endoplasmic reticulum (ER) stress has been shown to contribute to neuropathic or inflammatory pain, but its roles in opioids-induced hyperalgesia (OIH) are elusive. Here, we provide the first direct evidence that ER stress is a significant driver of OIH. GRP78, the ER stress marker, is markedly upregulated in neurons in the spinal cord after chronic morphine treatment. At the same time, morphine induces the activation of three arms of unfolded protein response (UPR): inositol-requiring enzyme 1α/X-box binding protein 1 (IRE1α/XBP1), protein kinase RNA-like ER kinase/eukaryotic initiation factor 2 subunit alpha (PERK/eIF2α), and activating transcription factor 6 (ATF6). Notably, we found that inhibition on either IRE1α/XBP1 or ATF6, but not on PERK/eIF2α could attenuate the development of OIH. Consequently, ER stress induced by morphine enhances PKA-mediated phosphorylation of NMDA receptor subunit 1(NR1) and leads to OIH. We further showed that heat shock protein 70 (HSP70), a molecular chaperone involved in protein folding in ER, is heavily released from spinal neurons after morphine treatment upon the control of K channel. Glibenclamide, a classic K channel blocker that inhibits the efflux of HSP70 from cytoplasm to extracellular environment, or HSP70 overexpression in neurons, could markedly suppress morphine-induced ER stress and hyperalgesia. Taken together, our findings uncover the induction process and the central role of ER stress in the development of OIH and support a novel strategy for anti-OIH treatment.