The endogenous opioid system, which alleviates physical pain, is also known to regulate social distress and reward in animal models. To test this hypothesis in humans (n=18), we used an μ-opioid receptor (MOR) radiotracer to measure changes in MOR availability in vivo with positron emission tomography during social rejection (not being liked by others) and acceptance (being liked by others). Social rejection significantly activated the MOR system (i.e., reduced receptor availability relative to baseline) in the ventral striatum, amygdala, midline thalamus and periaqueductal gray (PAG). This pattern of activation is consistent with the hypothesis that the endogenous opioids have a role in reducing the experience of social pain. Greater trait resiliency was positively correlated with MOR activation during rejection in the amygdala, PAG and subgenual anterior cingulate cortex (sgACC), suggesting that MOR activation in these areas is protective or adaptive. In addition, MOR activation in the pregenual ACC was correlated with reduced negative affect during rejection. In contrast, social acceptance resulted in MOR activation in the amygdala and anterior insula, and MOR deactivation in the midline thalamus and sgACC. In the left ventral striatum, MOR activation during acceptance predicted a greater desire for social interaction, suggesting a role for the MOR system in social reward. The ventral striatum, amygdala, midline thalamus, PAG, anterior insula and ACC are rich in MORs and comprise a pathway by which social cues may influence mood and motivation. MOR regulation of this pathway may preserve and promote emotional well being in the social environment.