Social flexibility enables individuals to switch between group and solitary living and is suggested to be an adaptation to varying environments. Several previous studies on different species compared two populations and hypothesized that observed differences in the social organization were due to differences in population density but lacked the necessary sample size to test this prediction. In a previous 8-year long-term study, we showed that one population of African striped mice (Rhabdomys pumilio) displayed temporal social flexibility, living solitarily in years when population density was low but in groups in years when population density was high. Building on this temporal variation, we now tested whether geographic variation reveals the same pattern. We studied 6 populations in discrete geographical locations simultaneously, predicting more solitary living in populations with lower population density. Population density correlated significantly with the percentage of striped mice living in groups whereas other (environmental) factors were not significant. Moreover, some individuals dispersed over unoccupied habitats between these populations, switching from group to solitary living. Geographic variation in population density could make social flexibility adaptive because it allows individuals to respond quickly to the prevailing conditions they experience post dispersal. Our results suggest that geographic variation drives the evolution of social flexibility in our metapopulation of striped mice, causing intra-specific variation in its social organization, which might also be important in other species, especially in species with a fast life history. Populations of the same species can differ in their social organization. It has often been assumed that this is due to differences in population density. We studied 6 populations of the African striped mice, showing that more mice were solitary living when population density was low. Thus, we demonstrated that population differences in social organization were due to differences in population density.