When explaining the reasons for others' behavior, perceivers often overemphasize underlying dispositions and personality traits over the power of the situation, a tendency known as the fundamental attribution error. One possibility is that this bias results from the spontaneous processing of others' mental states, such as their momentary feelings or more enduring personality characteristics. Here, we use fMRI to test this hypothesis. Participants read a series of stories that described a target's ambiguous behavior in response to a specific social situation and later judged whether that act was attributable to the target's internal dispositions or to external situational factors. Neural regions consistently associated with mental state inference—especially, the medial pFC—strongly predicted whether participants later made dispositional attributions. These results suggest that the spontaneous engagement of mentalizing may underlie the biased tendency to attribute behavior to dispositional over situational forces.