We previously demonstrated that the spinal cord κ-opioid receptor (KOR) and μ-opioid receptor (MOR) form heterodimers (KOR/MOR). KOR/MOR formation and the associated KOR dependency of spinal morphine antinociception are most robust during proestrus. Using Sprague Dawley rats, we now demonstrate that (1) spinal synthesis of estrogen is critical to these processes, and (2) blockade of either estrogen receptor (ER) α-, β-, or G-protein-coupled ER1 or progesterone receptor (PR) substantially reduces KOR/MOR and eliminates mediation by KOR of spinal morphine antinociception. Effects of blocking ERs were manifest within 15 min, whereas those of PR blockade were manifest after 18 h, indicating the requirement for rapid signaling by estrogen and transcriptional effects of progesterone. Individual or combined blockade of ERs produced the same magnitude of effect, suggesting that they work in tandem as part of a macromolecular complex to regulate KOR/MOR formation. Consistent with this inference, we found that KOR and MOR were coexpressed with ERα and G-protein-coupled ER1 in the spinal dorsal horn. Reduction of KOR/MOR by ER or PR blockade or spinal aromatase inhibition shifts spinal morphine antinociception from KOR dependent to KOR independent. This indicates a sex steroid-dependent plasticity of spinal KOR functionality, which could explain the greater analgesic potency of KOR agonists in women versus men. We suggest that KOR/MOR is a molecular switch that shifts the function of KOR and thereby endogenous dynorphin from pronociceptive to antinociceptive. KOR/MOR could thus serve as a novel molecular target for pain management in women.