Using the EEG recordings of patients with endometriosis-related chronic pelvic pain, we have examined the effective connectivity within the cortical pain-related network during rest and during pain-related imagery. During rest, an altered connectivity was hypothesized between cortical somatosensory pain areas and regions involved in emotional and cognitive modulation of pain. During pain-related imagery, alterations in prefrontal-temporal connectivity were expected. The effective connectivity was estimated using the Directed Transfer Function method. Differences between endometriosis patients and controls were found in the beta band (14–25 Hz). During rest, endometriosis was associated with an increased connectivity from the left dorsolateral prefrontal cortex to the left somatosensory cortex and also from the left somatosensory cortex to the orbitofrontal cortex and the right temporal cortex. These results might be related to sustained activation of the somatosensory pain system caused by the ongoing pain. During pain-related imagery, endometriosis patients showed an increased connectivity from the left dorsolateral prefrontal cortex to the right temporal cortex. This finding might point to impaired emotional regulation when processing pain-related stimuli, or it might be related to altered memorization of pain experiences. Results of this study open up new directions in chronic pain research aimed at exploring the beta band connectivity alterations. PerspectiveThis study examined the pain system's dynamics in endometriosis patients with chronic pelvic pain during resting-state and pain-related mental imagery. The results could contribute to the development of new therapies using guided mental imagery.