The aim of this contribution is to explore the origins of moral behavior and its underlying moral preferences and intuitions from an evolutionary perspective. Such a perspective encompasses both the ultimate, adaptive function of morality in our own species, as well as the phylogenetic distribution of morality and its key elements across primates. First, with regard to the ultimate function, we argue that human moral preferences are best construed as adaptations to the affordances of the fundamentally interdependent hunter-gatherer lifestyle of our hominin ancestors. Second, with regard to the phylogenetic origin, we show that even though full-blown human morality is unique to humans, several of its key elements are not. Furthermore, a review of evidence from non-human primates regarding prosocial concern, conformity, and the potential presence of universal, biologically anchored and arbitrary cultural norms shows that these elements of morality are not distributed evenly across primate species. This suggests that they have evolved along separate evolutionary trajectories. In particular, the element of prosocial concern most likely evolved in the context of shared infant care, which can be found in humans and some New World monkeys. Strikingly, many if not all of the elements of morality found in non-human primates are only evident in individualistic or dyadic contexts, but not as third-party reactions by truly uninvolved bystanders. We discuss several potential explanations for the unique presence of a systematic third-party perspective in humans, but focus particularly on mentalizing ability and language. Whereas both play an important role in present day, full-blown human morality, it appears unlikely that they played a causal role for the original emergence of morality. Rather, we suggest that the most plausible scenario to date is that human morality emerged because our hominin ancestors, equipped on the one hand with large and powerful brains inherited from their ape-like ancestor, and on the other hand with strong prosocial concern as a result of cooperative breeding, could evolve into an ever more interdependent social niche.