Theta oscillation (4-7 Hz) is well documented for its association with neural processes of memory. Pronounced increase of theta activity is commonly observed in patients with chronic neurogenic pain. However, its association with encoding of pain experience in patients with chronic pain is still unclear. The goal of the present study is to investigate the theta encoding of sensory and emotional information of long-term menstrual pain in women with primary dysmenorrhea (PDM). Forty-six young women with PDM and 46 age-matched control subjects underwent resting-state magnetoencephalography study during menstrual and periovulatory phases. Our results revealed increased theta activity in brain regions of pain processing in women with PDM, including the right parahippocampal gyrus, right posterior insula, and left anterior/middle cingulate gyrus during the menstrual phase and the left anterior insula and the left middle/inferior temporal gyrus during the periovulatory phase. The correlations between theta activity and the psychological measures pertaining to pain experience (depression, state anxiety, and pain rating index) implicate the role of theta oscillations in emotional and sensory processing of pain. The present study provides evidence for the role of theta oscillations in encoding the immediate and sustained effects of pain experience in young women with PDM.