Despite growing interest in the role of stress mediators in pain chronicity, the effects of the stress hormone cortisol on acute pain remain incompletely understood. In a randomized, double-blind, placebo-controlled study with N = 100 healthy volunteers, we tested the effects of oral hydrocortisone (20 mg) in 2 widely used pain models for the visceral and somatic modality. Salivary cortisol was increased in the hydrocortisone group (time × group: P < 0.001). For the visceral modality, assessed using pressure-controlled rectal distensions, hydrocortisone decreased the pain threshold from before to after treatment (time × group: P = 0.011), an effect primarily driven by women (time × sex: P = 0.027). For the somatic modality, cutaneous heat pain thresholds remained unaffected by hydrocortisone. Hydrocortisone did not alter perceived pain intensity or unpleasantness of either modality. Conditioned pain-related fear in response to predictive cues was only observed for the visceral modality (time × modality: P = 0.026), an effect that was significantly reduced by hydrocortisone compared with placebo (time × group: P = 0.028). This is the first psychopharmacological study to support that acutely increased cortisol enhances pain sensitivity and impairs pain-related emotional learning within the visceral, but not the somatic pain modality. Stress-induced visceral hyperalgesia and deficits in emotional pain-related learning could play a role in the pathophysiology of chronic visceral pain.