Emerging evidence indicates that metabotropic glutamate receptor 5 (mGluR5) critically modulates drug and drug-related behaviors. However, the role of mGluR5 in the opiate-induced contextual memory remains unclear. Here, we found that microinfusion of the mGluR5 antagonist 3-((2-Methyl-1,3-thiazol-4-yl)ethynyl)pyridine (MTEP) into the nucleus accumbens (NAc) shell, but not into the core, significantly attenuated the expression of morphine conditioned place preference (CPP) in rats. Following the expression of morphine CPP, the protein level of membrane mGluR5 was selectively increased in the NAc shell. In primary striatal neurons, we observed that treatment with the mGluR5 agonist CHPG increased the phosphorylation level of extracellular signal-regulated kinase (ERK), which was dependent on the mGluR5-inositol-1,4,5-trisphosphate-reactive oxygen species (ROS) pathway. Moreover, the microinjection of the ROS scavenger Tempol into the NAc shell of rats blocked the expression of morphine CPP. Further, the administration of t-BOOH, a ROS donor, into the NAc shell rescued the retrieval impairment of morphine CPP produced by MTEP. Our previous study demonstrated that the expression of morphine CPP increased the phosphorylation of ERK selectively in the NAc shell. Thus, results of the present study suggest that mGluR5 in the NAc shell, but not in the core, is essential for the retrieval of morphine contextual memory, which is mediated at least in part, through the ROS/ERK signaling pathway. Uncovering the molecular basis of opiate contextual memory will benefit the development of new therapeutic approaches for the treatment of opiate addiction.