Humans operate in groups that are oftentimes nested in multilayered collectives such as work units within departments and companies, neighborhoods within cities, and regions within nation states. With psychological science mostly focusing on proximate reasons for individuals to join existing groups and how existing groups function, we still poorly understand why groups form ex nihilo, how groups evolve into complex multilayered social structures, and what explains fission–fusion dynamics. Here we address group formation and the evolution of social organization at both the proximate and ultimate level of analysis. Building on models of fitness interdependence and cooperation, we propose that socioecologies can create positive interdependencies among strangers and pave the way for the formation of stable coalitions and groups through reciprocity and reputation-based partner selection. Such groups are marked by in-group bounded, parochial cooperation together with an array of social institutions for managing the commons, allowing groups to scale in size and complexity while avoiding the breakdown of cooperation. Our analysis reveals how distinct group cultures can endogenously emerge from reciprocal cooperation, shows that social identification and group commitment are likely consequences rather than causes of group cooperation, and explains when intergroup relations gravitate toward peaceful coexistence, integration, or conflict.