Amphetamine abuse is an important risk factor for the development of cognitive impairment involving learning and memory. Since in previous studies we have demonstrated the effectiveness of alpha-7 nicotinic receptor antagonists in preventing the neurotoxicity induced by amphetamine derivatives, the present paper seeks to determine whether pre-treatment with memantine (MEM) (an antagonist of both nicotinic and NMDA receptors) counteracts the memory impairment induced by 3,4-methylenedioxymethamphetamine (MDMA or ecstasy) administration in male Long Evans rats. In mice, MDMA and MEM induced a locomotor stimulant response but with a different profile. Moreover, MEM inhibited the rearing and thygmotaxis behaviour induced by MDMA. Non-spatial memory was tested in the object recognition test and the spatial learning and memory was tested in the Morris water maze. In our experimental conditions, rats receiving MEM pre-treatment recovered the ability to discriminate between the familiar and the novel object that had been abolished by MDMA treatment. Animals treated with MDMA showed impaired learning in the Morris water maze. Results of the probe trial demonstrated that MDMA-treated rats did not remember the location of the platform, but this memory impairment was also prevented by the MEM pre-treatment. Moreover, MEM alone improved the learning task. No differences were observed between the different groups as regards swim speed. In conclusion, MEM significantly improved the learning and memory impairment induced by MDMA and constitutes the first approach to the treatment of the long-term cognitive deficits found in ecstasy users.