Cultural psychologists and anthropologists argue that societies have developed heterogeneous systems of social organization to cope with social dilemmas, and that an entire bundle of cultural characteristics has coevolved to enforce cooperation within these different systems. This paper develops a measure of the historical tightness of kinship structures to provide empirical evidence for this large body of theories. In the data, societies with loose ancestral kinship ties cooperate and trust broadly, which is apparently sustained through a belief in moralizing gods, universally applicable moral principles, feelings of guilt, and large-scale institutions. Societies with a historically tightly knit kinship structure, on the other hand, exhibit strong in-group favoritism: they cheat on and are distrusting of out-group members, but readily support in-group members in need. This cooperation scheme is enforced by moral values of in-group loyalty, conformity to tight social norms, emotions of shame, and strong local institutions. These relationships hold across historical ethnicities, contemporary countries, ethnicities within countries, and migrants. The results suggest that religious beliefs, language, emotions, morality, and social norms all coevolved to support specific social cooperation systems.