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.SIGNIFICANCE STATEMENT We provide a detailed analysis of the effect of 3,4-methylenedioxy-methamphetamine (MDMA) on cooperative behavior during interpersonal interactions, as well as the neural correlates underlying these effects. We find that, following administration of MDMA, participants behave more cooperatively, but only when interacting with trustworthy partners. While breaches of trustworthy behavior have a similar impact following administration of MDMA compared with placebo, MDMA facilitates a greater recovery from these breaches of trust. Underlying this altered behavior are changes in brain activity during the viewing of opponents' behavior in regions whose involvement in social processing is well established. This work provides new insights into the impact of MDMA on social interactions, emphasizing the important role of the behavior of others toward us.