Sensitivity to the experiences of others contributes to many social behaviours including empathy and cooperation. Here, the authors show that oxytocin influences social behaviour in rhesus macaques in a context-dependent manner. When the monkeys had to choose whether to deliver a reward to another monkey or to no one, inhaled oxytocin increased the number of prosocial choices. By contrast, when monkeys had to choose between rewarding themselves or others, oxytocin enhanced selfish behaviour. Thus, as in humans, oxytocin enhances social information processing in situations in which sensitivity to another's experience is important.