Perceived control attenuates pain and pain-directed anxiety, possibly because it changes the emotional appraisal of pain. We examined whether brain areas associated with voluntary reappraisal of emotional experiences also mediate the analgesic effect of perceived control over pain. Using functional magnetic resonance imaging, we compared self-controlled noxious stimuli with physically identical stimuli that were externally controlled. Self-controlled stimulation was accompanied by less pain and anxiety and higher activation in dorsal anterior cingulate (dACC), right dorsolateral, and bilateral anterolateral prefrontal (alPFC) cortices. Activation in dACC and right alPFC was negatively correlated with pain intensity ratings. For externally controlled pain, activation in right alPFC was inversely correlated with the participants' general belief to have control over their lives. Our results are consistent with a reappraisal view of control and suggest that the analgesic effect of perceived control relies on activation of right alPFC. Failure to activate right alPFC may explain the maladaptive effects of strong general control beliefs during uncontrollable pain.