Sex differences are observed in the development of tolerance to the antinociceptive effect of opioid drugs such as morphine, but the precise underlying mechanism remains unclear. There are evidences about the interaction between gonadal hormones and neuromodulatory systems including opioidergic and glutamatergic systems. We examined the sex differences and the role of gonadal hormones on the glutamate level in the nucleus accumbens in morphine tolerant rats using in vivo microdialysis. A microdialysis probe was implanted into the left nucleus accumbens core of rats and CSF (cerebrospinal fluid) dialysates were collected. The concentration of glutamate was measured by high-performance liquid chromatography with a fluorescence detector. The results showed that after chronic morphine administration, tolerance to antinociceptive effects of morphine was significantly greater in male rats (P<0.001). Sex differences in tolerance to morphine disappeared with gonadectomy of animals. There was also a significant sex difference in the glutamate level in the nucleus accumbens of morphine tolerant rats (P<0.001), ovariectomy of female rats decreased the glutamate level significantly (P<0.001), while gonadectomy did not change the glutamate level in males significantly. In conclusion, these experiments demonstrate that the excitatory amino acid release in the nucleus accumbens may be modulated by an estrogen-sensitive mechanism and play a role in the morphine analgesia and tolerance.