Pain perception is decreased by shifting attentional focus away from a threatening event. This attentional analgesia engages parallel descending control pathways from anterior cingulate (ACC) to locus coeruleus, and ACC to periaqueductal grey (PAG) – rostral ventromedial medulla (RVM), indicating possible roles for noradrenergic or opioidergic neuromodulators. To determine which pathway modulates nociceptive activity in humans we used simultaneous whole brain-spinal cord pharmacological-fMRI (N=39) across three sessions. Noxious thermal forearm stimulation generated somatotopic-activation of dorsal horn (DH) whose activity correlated with pain report and mirrored attentional pain modulation. Activity in an adjacent cluster reported the interaction between task and noxious stimulus. Effective connectivity analysis revealed that ACC interacts with PAG and RVM to modulate spinal cord activity. Blocking endogenous opioids with Naltrexone impairs attentional analgesia and disrupts RVM-spinal and ACC-PAG connectivity. Noradrenergic augmentation with Reboxetine did not alter attentional analgesia. Cognitive pain modulation involves opioidergic ACC-PAG-RVM descending control which suppresses spinal nociceptive activity.