Fibromyalgia is a prevalent pain condition that is associated with cognitive impairments including in attention, memory, and executive processing. It has been proposed that fibromyalgia may be caused by altered central pain processing characterised by a loss of endogenous pain modulation. We tested whether attentional analgesia, where cognitive engagement diminishes pain percept, was attenuated in patients with fibromyalgia (n = 20) compared with matched healthy controls (n = 20). An individually calibrated, attentional analgesia paradigm with a 2 × 2 factorial design was used with brain and brainstem-focussed functional magnetic resonance imaging. Patients with fibromyalgia had both lower heat pain thresholds and speeds in a visual attention task. When this was taken into account for both attentional task and thermal stimulation, both groups exhibited an equivalent degree of attentional analgesia. Functional magnetic resonance imaging analysis showed similar patterns of activation in the main effects of pain and attention in the brain and brainstem (with the sole exceptions of increased activation in the control group in the frontopolar cortex and the ipsilateral locus coeruleus). The attentional analgesic effect correlated with activity in the periaqueductal gray and rostral ventromedial medulla. These findings indicate that patients with fibromyalgia can engage the descending pain modulatory system if the attentional task and noxious stimulus intensity are appropriately titrated.