Altruistic behavior varies considerably across people and decision contexts. The relevant computational and motivational mechanisms that underlie its heterogeneity, however, are poorly understood. Using a charitable giving task together with multivariate decoding techniques, we identified three distinct psychological mechanisms underlying altruistic decision-making (empathy, perspective taking, and attentional reorienting) and linked them to dissociable neural computations. Neural responses in the anterior insula (AI) (but not temporoparietal junction [TPJ]) encoded trial-wise empathy for beneficiaries, whereas the TPJ (but not AI) predicted the degree of perspective taking. Importantly, the relative influence of both socio-cognitive processes differed across individuals: participants whose donation behavior was heavily influenced by affective empathy exhibited higher predictive accuracies for generosity in AI, whereas those who strongly relied on cognitive perspective taking showed improved predictions of generous donations in TPJ. Furthermore, subject-specific contributions of both processes for donations were reflected in participants' empathy and perspective taking responses in a separate fMRI task (EmpaToM), suggesting that process-specific inputs into altruistic choices may reflect participants' general propensity to either empathize or mentalize. Finally, using independent attention task data, we identified shared neural codes for attentional reorienting and generous donations in the posterior superior temporal sulcus, suggesting that domain-general attention shifts also contribute to generous behavior (but not in TPJ or AI). Overall, our findings demonstrate highly specific roles of AI for affective empathy and TPJ for cognitive perspective taking as precursors of prosocial behavior and suggest that these discrete routes of social cognition differentially drive intraindividual and interindividual differences in altruistic behavior. Human societies depend on the altruistic behavior of their members, but teasing apart its underlying motivations and neural mechanisms poses a serious challenge. Using multivariate decoding techniques, we delineated three distinct processes for altruistic decision-making (affective empathy, cognitive perspective taking, and domain-general attention shifts), linked them to dissociable neural computations, and identified their relative influence across individuals. Distinguishing process-specific computations both behaviorally and neurally is crucial for developing complete theoretical and neuroscientific accounts of altruistic behavior and more effective means of increasing it. Moreover, information on the relative influence of subprocesses across individuals and its link to people's more general propensity to engage empathy or perspective taking can inform training programs to increase prosociality, considering their "fit" with different individuals.