Functional neuroimaging studies suggest that a large-scale brain network transforms others’ pain into its vicarious representation in the observer, potentially modulating helping behavior. However, the neuromolecular basis of individual differences in vicarious pain and helping is poorly understood. We investigated the role of the endogenous μ-opioid receptor (MOR) system in altruistic costly helping. MOR density was measured using [11C]carfentanil. In a separate fMRI experiment, participants could donate money to reduce a confederate’s pain from electric shocks. Participants were generally willing to help, and brain activity was observed in amygdala, anterior insula, anterior cingulate cortex (ACC), striatum, primary motor cortex, primary somatosensory cortex and thalamus when witnessing others’ pain. Haemodynamic responses were negatively associated with MOR availability in emotion circuits. However, MOR availability positively associated with the ACC and hippocampus during helping. These findings suggest that the endogenous MOR system modulates altruism in the human brain.