Theories of moral development propose that empathy is transmitted across individuals, yet the mechanism through which empathy is socially transmitted remains unclear. We conducted three studies to investigate whether, and if so, how observing empathic responses in others affects the empathy of the observer. Our results show that observing empathic or non-empathic responses generates learning signals that respectively increases or decreases empathy ratings of the observer and alters empathy-related responses in the anterior insula (AI), i.e., the same region that correlated with empathy baseline ratings, as well as its functional connectivity with the temporal-parietal junction (TPJ). Together, our findings provide a neurocomputational mechanism for the social transmission of empathy that accounts for changes in individual empathic responses in empathic and non-empathic social environments.