Social decision-making is fundamental for successful functioning and can be affected in psychiatric illness and by serotoninergic modulation. The Prisoner's Dilemma is the archetypal paradigm to model cooperation and trust. However, the effect of serotonergic enhancement is poorly characterized, and its influence on the effect of variations in opponent behavior unknown. To address this, we conducted a study investigating how the serotonergic enhancer 3,4-methylenedioxy-methamphetamine (MDMA) modulates behavior and its neural correlates during an iterated Prisoner's Dilemma with both trustworthy and untrustworthy opponents. We administered 100 mg MDMA or placebo to 20 male participants in a double-blind, placebo-controlled, crossover study. While being scanned, participants played repeated rounds with opponents who differed in levels of cooperation. On each round, participants chose to compete or cooperate and were asked to rate their trust in the other player. Cooperation with trustworthy, but not untrustworthy, opponents was enhanced following MDMA but not placebo (respectively: odds ratio ϭ 2.01; 95% CI, 1.42-2.84, p Ͻ 0.001; odds ratio ϭ 1.37; 95% CI, 0.78-2.30, not significant). Specifically, MDMA enhanced recovery from, but not the impact of, breaches in cooperation. During trial outcome, MDMA increased activation of four clusters incorporating precentral and supramarginal gyri, superior temporal cortex, central operculum/ posterior insula, and supplementary motor area. There was a treatment ϫ opponent interaction in right anterior insula and dorsal caudate. Trust ratings did not change across treatment sessions. MDMA increased cooperative behavior when playing trustworthy opponents. Underlying this was a change in brain activity of regions linked to social cognition. Our findings highlight the context-specific nature of MDMA's effect on social decision-making.