Natural selection produces cognitive systems that are well designed for solving ancestral adaptive problems. For a group-living species like our own, this principle implies that interacting with others will be regulated by sophisticated cognitive systems. Here we explain how evolutionary game theory is used to identify ancestral problems of social interaction and what counted as adaptive solutions to these problems during our evolutionary past. We start with a detailed examination of selection pressures that shape mechanisms for interacting with kin; these specify an envelope of conditions in which selection favors (i) acting with beneficence toward kin and (ii) avoiding sexual contact with kin. By combining these analyses with knowledge of how our hunter-gatherer ancestors lived, evolutionary psychologists were able to develop and test hypotheses about the computational design of systems regulating interaction with kin. These cognitive adaptations produce intuitions about how we ought to treat kin and how kin ought to treat us—moral intuitions about duties of beneficence and sexual prohibitions. We then consider selection for cooperation with unrelated individuals and how this differs from interactions with kin. Topics include the evolution of cooperation by partner control (punishment) versus partner choice; collective action; and the role of luck versus effort in sharing. Research guided by these theories suggests that selection has produced adaptations that generate different moral inferences in each of these domains. Capturing this moral diversity may require normative theories that embrace moral pluralism—brands of ethical intuitionism, moral sentimentalism, or virtue ethics.