In several group-living species, individuals' social preferences are thought to be influenced by cooperation. For some societies with fission–fusion dynamics, sex-specific association patterns reflect sex differences in cooperation in within- and between-group contexts. In our study, we investigated this hypothesis further by comparing sex-specific association patterns in two closely related species, chimpanzees and bonobos, which differ in the level of between-group competition and in the degree to which sex and kinship influence dyadic cooperation. Here, we used long-term party composition data collected on five chimpanzee and two bonobo communities and assessed, for each individual of 10 years and older, the sex of its top associate and of all conspecifics with whom it associated more frequently than expected by chance. We found clear species differences in association patterns. While in all chimpanzee communities males and females associated more with same sex partners, in bonobos males and females tended to associate preferentially with females, but the female association preference for other females is lower than in chimpanzees. Our results also show that, for bonobos (but not for chimpanzees), association patterns were predominantly driven by mother–offspring relationships. These species differences in association patterns reflect the high levels of male–male cooperation in chimpanzees and of mother–son cooperation in bonobos. Finally, female chimpanzees showed intense association with a few other females, and male chimpanzees showed more uniform association across males. In bonobos, the most differentiated associations were from males towards females. Chimpanzee male association patterns mirror fundamental human male social traits and, as in humans, may have evolved as a response to strong between-group competition. The lack of such a pattern in a closely related species with a lower degree of between-group competition further supports this notion.