Perceptions of others' traits based on social group membership (stereotypes) are known to affect social behavior, but little is known about the neural mechanisms mediating these effects. Here, using fMRI and representational similarity analysis (RSA), we investigated neural representations of others' traits and their contributions to social decision making. Behaviorally, perceptions of others' traits, captured by a two-dimensional framework, biased participants' monetary allocation choices in a context-dependent manner: recipients' perceived warmth increased advantageous inequity aversion and competence increased disadvantageous inequity aversion. Neurally, RSA revealed that stereotypes about others' traits were represented in activity patterns in the temporoparietal junction and superior temporal sulcus, two regions associated with mentalizing, and in the lateral orbitofrontal cortex (OFC), known to represent latent environmental features during goal-directed outcome inference. Critically, only the latter predicted individual choices, suggesting that the effect of stereotypes on behavior is mediated by inference-based, goal-directed decision-making processes in the OFC.