Primate societies are unusually complex compared to those of other animals, and the need to manage such complexity is the main explanation for the fact that primates have unusually large brains. Primate sociality is based on bonded relationships that underpin coalitions, which in turn are designed to buffer individuals against the social stresses of living in large, stable groups. This is reflected in a correlation between social group size and neocortex size in primates (but not other species of animals), commonly known as the social brain hypothesis, although this relationship itself is the outcome of an underlying relationship between brain size and behavioral complexity. The relationship between brain size and group size is mediated, in humans at least, by mentalizing skills. Neuropsychologically, these are all associated with the size of units within the theory of mind network (linking prefrontal cortex and temporal lobe units). In addition, primate sociality involves a dual-process mechanism whereby the endorphin system provides a psychopharmacological platform off which the cognitive component is then built. This article considers the implications of these findings for the evolution of human cognition over the course of hominin evolution.