Previous behavioral studies have shown that sharing painful experiences can strengthen social bonds and promote mutual prosociality, yet the neural mechanisms underlying this phenomenon remain unclear. We hypothesized that sharing a painful experience induces brain-to-brain synchronization and mutual empathy for each other's pain between pain-takers and pain-observers, which then leads to enhanced social bonding. To test this hypothesis, we adopted an electroencephalographic (EEG) hyper-scanning technique to assess neuronal and behavioral activity during a Pain-Sharing task in which high- or low-intensity pain stimulation was randomly delivered to one participant of a dyad on different experimental trials. Single-brain analysis showed that sensorimotor α-oscillation power was suppressed more when expecting high-intensity pain than when expecting low-intensity pain similarly for self-directed or partner-directed pain. Dual-brain analysis revealed that expecting high-intensity pain induced greater brain-to-brain synchronization of sensorimotor α-oscillation phases between pain-takers and pain-observers than did expecting low-intensity pain. Mediation analysis further revealed that brain-to-brain synchronization of sensorimotor α-oscillations mediated the effects of pain-stimulation intensity on mutual affective sharing for partner-directed pain. This mutual affective empathy during the task predicted the social bonding, as indexed by prosocial inclinations measured after the task. These results support the hypothesis that sharing a painful experience triggers emotional resonance between pairs of individuals through brain-to-brain synchronization of neuronal α-oscillations recorded over the sensorimotor cortex, and this emotional resonance further strengthens social bonds and motivates prosocial behavior within pairs of individuals.