Chronic use of 3,4-methylenedioxymethamphetamine (MDMA, “ecstasy”) has repeatedly been associated with deficits in working memory, declarative memory, and executive functions. However, previous findings regarding working memory and executive function are inconclusive yet, as in most studies concomitant stimulant use, which is known to affect these functions, was not adequately controlled for. Therefore, we compared the cognitive performance of 26 stimulant-free and largely pure (primary) MDMA users, 25 stimulant-using polydrug MDMA users, and 56 MDMA/stimulant-naïve controls by applying a comprehensive neuropsychological test battery. Neuropsychological tests were grouped into four cognitive domains. Recent drug use was objectively quantified by 6-month hair analyses on 17 substances and metabolites. Considerably lower mean hair concentrations of stimulants (amphetamine, methamphetamine, methylphenidate, cocaine), opioids (morphine, methadone, codeine), and hallucinogens (ketamine, 2C-B) were detected in primary compared to polydrug users, while both user groups did not differ in their MDMA hair concentration. Cohen's d effect sizes for both comparisons, i.e., primary MDMA users vs. controls and polydrug MDMA users vs. controls, were highest for declarative memory (d primary =.90, d polydrug =1.21), followed by working memory (d primary =.52, d polydrug =.96), executive functions (d primary =.46, d polydrug =.86), and attention (d primary =.23, d polydrug =.70). Thus, primary MDMA users showed strong and relatively discrete declarative memory impairments, whereas MDMA polydrug users displayed broad and unspecific cognitive impairments. Consequently, even largely pure chronic MDMA use is associated with decreased performance in declarative memory, while additional deficits in working memory and executive functions displayed by polydrug MDMA users are likely driven by stimulant co-use.