Individuals with generalized social anxiety disorder tend to make overly negative and distorted predictions about social events, which enhance perceptions of threat and contribute to excessive anxiety in social situations. Here, we coupled functional magnetic resonance imaging and a multiround economic exchange game ('trust game') to probe mentalizing, the social-cognitive ability to attribute mental states to others. Relative to interactions with a computer, those with human partners ('mentalizing') elicited less activation of medial prefrontal cortex in generalized social anxiety patients compared with matched healthy control participants. Diminished medial prefrontal cortex function may play a role in the social-cognitive pathophysiology of social anxiety.