Activation of the cholecystokinin type B receptor (CCKBR) by cholecystokinin octapeptide (CCK-8) inhibits opioid analgesia. Chronic opiate treatment leads to an increase in the CCK-8 concentration and thus enhances the antagonism of CCK-8 against opioid analgesia; the underlying molecular mechanisms remain of great interest. In the present study, we validated the colocalization of the μ-opioid receptor (MOR) and CCKBR in pain signal transmission-related spinal cord dorsal horn and dorsal root ganglion neurons of rats. Co-immunoprecipitation (Co-IP) and fluorescence lifetime-imaging-microscopy-based fluorescence resonance energy transfer (FLIM-FRET) assays showed that MOR heteromerized with CCKBR directly in transfected HEK293 cells. Combined with MOR mutant construction, the third transmembrane domain of MOR (TM3MOR) was demonstrated to participate in heteromerization with CCKBR. Receptor ligand binding, ERK phosphorylation and cAMP assays showed that MOR heteromerization with CCKBR weakened the activity of MOR. A cell-penetrating interfering peptide consisting of TM3MOR and TAT (a transactivator of HIV-1) sequences from the N terminal to the C terminal disrupted the MOR-CCKBR interaction and restored the activity of MOR in transfected HEK293 cells. Furthermore, intrathecal application of the TM3MOR-TAT peptide alleviated CCK-8-injection-induced antagonism to morphine analgesia in rats. These results suggest a new molecular mechanism for CCK-8 antagonism to opioid analgesia in terms of G-protein-coupled receptor (GPCR) interaction through direct heteromerization. Our study may provide a potential strategy for pain management with opioid analgesics.