Rationale: MDMA alters body temperature in rats with a direction that depends on the ambient temperature (TA). The thermoregulatory effects of MDMA and TA may affect intravenous self-administration (IVSA) of MDMA but limited prior reports conflict. Objective: To determine how body temperature responses to MDMA under high and low TA affect IVSA. Methods: Male Sprague-Dawley rats were trained to IVSA MDMA (1.0 mg/kg/infusion; 2-hr sessions; FR5 schedule of reinforcement) under TA 20°C or 30°C. Radiotelemetry transmitters recorded body temperature and activity during IVSA. Results: MDMA intake increased under both TA during acquisition to a greater extent in the 30°C group. The magnitude of hypothermia was initially equivalent between groups but diminished over training in the 30°C group. Within-session activity was initially lower in the 30°C group, but by the end of acquisition and maintenance, activity was similar for both groups. When TA conditions were swapped, the hot-trained group increased MDMA IVSA under 20°C TA and modest decreases in drug intake were observed in the cold-trained group under 30°C TA. Subsequent non-contingent MDMA (1.0-5.0 mg/kg, i.v.) found that rats with higher MDMA IVSA rates showed blunted hypothermia compared with rats with lower IVSA levels; however, within-session activity did not differ by group. High TA increased intracranial self-stimulation thresholds in a different group of rats but MDMA reduced thresholds at low, but not high, TA. Conclusions: High TA appears to enhance acquisition of MDMA IVSA through an aversive effect and not via thermoregulatory motivation.