Efficient brain–computer interfaces (BCIs) are in need of knowledge about the human brain and how it interacts, plays games, and socializes with other brains. A breakthrough can be achieved by revealing the microfoundations of sociality, an additional component of the utility function reflecting the value of contributing to group success derived from social identity. Building upon our previous behavioral work, we conduct a series of functional magnetic resonance imaging (fMRI) experiments (N = 10 in the Pilot Study and N = 15 in the Main Study) to measure whether and how sociality alters the functional activation of and connectivity between specific systems in the brain. The overarching hypothesis of this study is that sociality, even in a minimal form, serves as a natural mechanism of sustainable cooperation by fostering interaction between brain regions associated with social cognition and those related to value calculation. We use group-based manipulations to induce varying levels of sociality and compare behavior in two social dilemmas: Prisoner’s Dilemma and variations of Ultimatum Game. We find that activation of the right inferior frontal gyrus, a region previously associated with cognitive control and modulation of the valuation system, is correlated with activity in the medial prefrontal cortex (mPFC) to a greater degree when participants make economic decisions in a game with an acquaintance, high sociality condition, compared to a game with a random individual, low sociality condition. These initial results suggest a specific biological mechanism through which sociality facilitates cooperation, fairness and provision of public goods at the cost of individual gain. Future research should examine neural dynamics in the brain during the computation of utility in the context of strategic games that involve social interaction for a larger sample of subjects.