Peers are important socializers of adolescent prosocial behavior. Still, the proximal cognitive and emotional process underlying this link and the sources of individual differences in sensitivity to peer influence have yet to be explored. Utilizing the gene-gene-environment (G × G × E) approach and multi-informant measurement, this study investigated how peer relationships operate to influence adolescent prosocial behavior by examining the mediating role of cognitive and emotional empathy, and the moderating role of the OXTR and DRD2 genes. The study utilized longitudinal data from a community sample of Chinese adolescents (N = 1080, Mage = 13.32 years at T1). Results showed that cognitive empathy rather than emotional empathy mediated the link between peer acceptance/rejection and prosocial behavior. Furthermore, the association among peer acceptance, cognitive empathy, and prosocial behavior was moderated by OXTR and DRD2. Specifically, adolescents with the combinations of AA/AA or G/G genotypes of OXTR/DRD2 benefited more from peer acceptance compared to their counterparts carrying other combined genotypes. The findings highlight cognitive empathy as a proximal process linking peer interaction to prosocial behavior and lend support to the interaction between oxytocinergic and dopaminergic systems on environmental sensitivity.