Chimpanzees act cooperatively in the wild, but whether they afford benefits to others, and whether their tendency to act prosocially varies across communities, is unclear. Here, we show that chimpanzees from neighboring communities provide valuable resources to group members at personal cost, and that the magnitude of their prosocial behavior is group specific. Provided with a resource-donation experiment allowing free (partner) choice, we observed an increase in prosocial acts across the study period in most of the chimpanzees. When group members could profit (test condition), chimpanzees provided resources more frequently and for longer durations than when their acts produced inaccessible resources (control condition). Strikingly, chimpanzees’ prosocial behavior was group specific, with more socially tolerant groups acting more prosocially. We conclude that chimpanzees may purposely behave prosocially toward group members, and that the notion of group-specific sociality in nonhuman animals should crucially inform discussions on the evolution of prosocial behavior.