Although common in birds, social monogamy, or pair-living, is rare among mammals because internal gestation and lactation in mammals makes it advantageous for males to seek additional mating opportunities. A number of hypotheses have been proposed to explain the evolution of social monogamy among mammals: as a male mate-guarding strategy, because of the benefits of biparental care, or as a defense against infanticidal males. However, comparative analyses have been unable to resolve the root causes of monogamy. Primates are unusual among mammals because monogamy has evolved independently in all of the major clades. Here we combine trait data across 230 primate species with a Bayesian likelihood framework to test for correlated evolution between monogamy and a range of traits to evaluate the competing hypotheses. We find evidence of correlated evolution between social monogamy and both female ranging patterns and biparental care, but the most compelling explanation for the appearance of monogamy is male infanticide. It is only the presence of infanticide that reliably increases the probability of a shift to social monogamy, whereas monogamy allows the secondary adoption of paternal care and is associated with a shift to discrete ranges. The origin of social monogamy in primates is best explained by long lactation periods caused by altriciality, making primate infants particularly vulnerable to infanticidal males. We show that biparental care shortens relative lactation length, thereby reducing infanticide risk and increasing reproductive rates. These phylogenetic analyses support a key role for infanticide in the social evolution of primates, and potentially, humans.