Empathy is a critical component of social interaction that enables individuals to understand and share the emotions of others. We report a pre-registered experiment in which 240 participants, including adolescents, young adults and older adults, viewed images depicting hands and feet in physically or socially painful situations (vs. non-painful). Empathy was measured using imagined pain ratings and EEG mu suppression. Imagined pain was greater for physical vs. social pain, with young adults showing particular sensitivity to social pain events compared to adolescents and older adults. Mu desynchronisation was greater to pain vs. no-pain situations, but the physical/social context did not modulate pain responses. Brain responses to painful situations increased linearly from adolescence to young and older adulthood. These findings highlight shared activity across the core empathy network for both physical and social pain contexts, and an empathic response that develops over the lifespan with accumulating social experience.