Many fearful expectations are shaped by observation of aversive outcomes to others. Yet, the neurochemistry regulating social learning is unknown. Previous research has shown that during direct (Pavlovian) threat learning, information about personally experienced outcomes is regulated by the release of endogenous opioids, and activity within the amygdala and periaqueductal gray (PAG). Here we report that blockade of this opioidergic circuit enhances social threat learning through observation in humans involving activity within the amygdala, midline thalamus and the PAG. In particular, anticipatory responses to learned threat cues (CS) were associated with temporal dynamics in the PAG, coding the observed aversive outcomes to other (observational US). In addition, pharmacological challenge of the opioid receptor function is classified by distinct brain activity patterns during the expression of conditioned threats. Our results reveal an opioidergic circuit that codes the observed aversive outcomes to others into threat responses and long-term memory in the observer.