The most powerful analgesic and addictive properties of opiate alkaloids are mediated by the μ opioid receptor (MOR). The MOR has been extensively investigated as a drug target in the twentieth century, with numerous compounds of varying efficacy being identified. We employed molecular dynamics and Gaussian accelerated molecular dynamics techniques to identify the binding mechanisms of MORs to BU72 (agonist) and β-funaltrexamine (antagonist). Our approach theoretically suggests that the 34 residues (Lys209–Phe221 and Ile301–Cys321) of the MORs were the key regions enabling the two compounds to bind to the active site of the MORs. When the MORs were in the holo form, the key region was in the open conformation. When the MORs were in the apo form, the key region was in the closed conformation. The key region might be responsible for the selectivity of new MOR agonists and antagonists.