Rejections of unfair offers in the ultimatum game (UG) are commonly assumed to reflect negative emotional arousal mediated by the anterior insula and medial prefrontal cortex. We aimed to disentangle those neural mechanisms associated with direct personal involvement ('I have been treated unfairly') from those associated with fairness considerations, such as the wish to discourage unfair behavior or social norm violations ('this person has been treated unfairly'). For this purpose, we used fMRI and asked participants to play the UG as responders either for themselves (myself) or on behalf of another person (third party). Unfair offers were equally often rejected in both conditions. Neuroimaging data revealed a dissociation between the medial prefrontal cortex, specifically associated with rejections in the myself condition, thus confirming its role in self-related emotional responses, and the left anterior insula, associated with rejections in both myself and third-party conditions, suggesting a role in promoting fair behavior also toward third parties. Our data extend the current understanding of the neural substrate of social decision making, by disentangling the structures sensitive to direct emotional involvement of the self from those implicated in pure fairness considerations.