Humans are highly attuned to fairness, with people willingly suffering personal costs to prevent others benefitting from unfair acts. Are fairness judgments influenced by group alignments? A new theory posits that we favour ingroups and denigrate members of rival outgroups when our personal identity is fused to a group. Although the medial prefrontal cortex (MPFC) has been separately implicated in group membership and fairness processing, it is unclear whether group alignments affect MPFC activity in response to fairness. Here, subjects performed rounds of the Ultimatum Game, being offered fair or unfair divisions of money from supporters of the same soccer team (ingroup), the fiercest rival (outgroup) or neutral individuals. Strikingly, people willingly suffered personal costs to prevent outgroup members benefitting from both unfair and fair offers. Activity across dorsal and ventral (VMPFC) portions of the mPFC reflected an interaction between fairness and group membership. VMPFC activity in particular was consistent with it coding one’s fusion to a group, with the fairness by group membership interaction correlating with the extent that the responder’s identity was fused to the ingroup. The influence of fusion on social behavior therefore seems to be linked to processing in the VMPFC.