From an evolutionary perspective, morality is a form of cooperation. Cooperation requires individuals either to suppress their own self-interest or to equate it with that of others. We review recent research on the origins of human morality, both phylogenetic (research with apes) and ontogenetic (research with children). For both time frames we propose a two-step sequence: first a second-personal morality in which individuals are sympathetic or fair to particular others, and second an agent-neutral morality in which individuals follow and enforce group-wide social norms. Human morality arose evolutionarily as a set of skills and motives for cooperating with others, and the ontogeny of these skills and motives unfolds in part naturally and in part as a result of sociocultural contexts and interactions.