Background Opioid switching is a therapeutic maneuver to improve analgesic response and/or reduce adverse side effects although the underlying mechanisms remain unknown. The μ-opioid receptor (MOR) has an important role in mediating the actions of morphine and other analgesic agents. This study is aimed at exploring the changes of MOR in the periaqueductal gray (PAG) in rats when morphine is substituted for equianalgesic fentanyl. Methods Forty rats were randomly assigned to five treatment groups: 7 days normal saline group (N group), 7 days fentanyl group (F group), 7 days morphine group (M group), 7 days morphine and 7 days fentanyl-switching group (MF group), and 14 days morphine group (MM group). Rats repeatedly received subcutaneous injections of morphine sulfate (10 mg/kg) or equianalgesic fentanyl sulfate (0.1 mg/kg) twice daily. Rats' antinociceptive response to thermal pain was evaluated by the tail flick latency assay. MOR mRNA and protein expression in the PAG were measured using RT-PCR and Western blotting analyses respectively. Results This study showed that after morphine was substituted with fentanyl on day 8, the tail flick latency (TFL) increased from (3.9±0.4) seconds to (11.4±0.4) seconds. The results also demonstrated that both MOR mRNA and protein expression in the PAG of rats in the MF group were less than that in the M group (P<0.05) but more than that in MM group (P<0.05). Conclusions Equianalgesic fentanyl was still antinociceptive effective in rats with morphine tolerance, which may be due to the switching from morphine to fentanyl attenuating the decline of MOR expression in the PAG of rats.