Most primates seem specialized for social life, yet how biology shapes complex social behaviors remains poorly understood. To address this gap, we study the biology and behavior of rhesus macaques in both the laboratory and the field. Recent work in the lab shows that monkeys favor giving rewards to another monkey, particularly if he is more familiar or subordinate, rather than give the rewards to no one. Oxytocin—a hormone implicated in social bonding—makes monkeys more giving. Finally, giving behavior selectively activates cells in medial frontal cortex, an area previously implicated in empathy in humans. In a separate study, we found inactivating this area impairs social learning. By contrast, when monkeys play a competitive game against each other, they rapidly develop unpredictable behaviors that serve to hide their intentions. Planning deceptive feints activates a population of neurons in the lateral frontal cortex, an area linked to deceptive planning in humans; inactivating these cells impairs deceptive planning. In the field, we find that intraspecific variation in social behavior and cognition has fitness consequences and emerges, in part, from genes that regulate neuromodulatory function. Together, our findings suggest deep homologies in the biological origins of complex social function in primates.