Despite the prevalence of large-group living across the animal kingdom, no studies have examined the neural mechanisms that make group living possible. Spiny mice, Acomys, have evolved to live in large groups and exhibit a preference to affiliate with large over small groups. Here, we determine the neural circuitry that facilitates the drive to affiliate with large groups. We first identify an anterior cingulate cortex (ACC) to lateral septum (LS) circuit that is more responsive to large than small groups of novel same-sex peers. Using chemogenetics, we then demonstrate that this circuit is necessary for both male and female group investigation preferences but only males' preference to affiliate with larger peer groups. Furthermore, inhibition of the ACC-LS circuit specifically impairs social, but not nonsocial, affiliative grouping preferences. These findings reveal a key circuit for the regulation of mammalian peer group affiliation.