This study is aimed to clarify the association between MDMA cumulative use and cognitive dysfunction, and the potential role of candidate genetic polymorphisms in explaining individual differences in the cognitive effects of MDMA. Gene polymorphisms related to reduced serotonin function, poor competency of executive control and memory consolidation systems, and high enzymatic activity linked to bioactivation of MDMA to neurotoxic metabolites may contribute to explain variations in the cognitive impact of MDMA across regular users of this drug. Sixty ecstasy polydrug users, 110 cannabis users and 93 non-drug users were assessed using cognitive measures of Verbal Memory (California Verbal Learning Test, CVLT), Visual Memory (Rey-Osterrieth Complex Figure Test, ROCFT), Semantic Fluency, and Perceptual Attention (Symbol Digit Modalities Test, SDMT). Participants were also genotyped for polymorphisms within the 5HTT, 5HTR2A, COMT, CYP2D6, BDNF, and GRIN2B genes using polymerase chain reaction and TaqMan polymerase assays. Lifetime cumulative MDMA use was significantly associated with poorer performance on visuospatial memory and perceptual attention. Heavy MDMA users (>100 tablets lifetime use) interacted with candidate gene polymorphisms in explaining individual differences in cognitive performance between MDMA users and controls. MDMA users carrying COMT val/val and SERT s/s had poorer performance than paired controls on visuospatial attention and memory, and MDMA users with CYP2D6 ultra-rapid metabolizers performed worse than controls on semantic fluency. Both MDMA lifetime use and gene-related individual differences influence cognitive dysfunction in ecstasy users. © 2011 Cuyàs et al.