Background: Electroacupuncture (EA) is widely used in clinical practice to relieve migraine pain. 5-HT7 receptor (5-HT7R) has been reported to play an excitatory role in neuronal systems and regulate hyperalgesic pain and neurogenic inflammation. 5-HT7R could influence Phosphorylation of protein kinase A (PKA)- or Extracellular signal-regulated kinase1/2 (ERK1/2)-mediated signaling pathways, which mediate sensitization of nociceptive neurons via interacting with cyclic Adenosine monophosphate (cAMP). In this study, we evaluated the role of 5-HT7R in the antihyperalgesic effects of EA and the underlying mechanism through regulation of PKA and ERK1/2 in trigeminal ganglion (TG) and trigeminal nucleus caudalis (TNC). Methods: Hyperalgesia was induced in rats with dural injection of inflammatory soup (IS) to cause meningeal neurogenic inflammatory pain. Electroacupuncture was applied for 15 minutes every other day before IS injection. Von Frey filaments, tail-flick, hot-plate, and cold-plated tests were used to evaluate the mechanical and thermal hyperalgesia. Neuronal hyperexcitability in TNC was studied by an electrophysiological technique. The 5-HT7R antagonist (SB269970) or 5-HT7R agonist (AS19) was administered intrathecally before each IS application at 2-days intervals during the 7-days injection protocol. The changes in 5-HT7R and 5-HT7R-mediated signaling pathway were examined by real time polymerase chain reaction (RT-PCR), Western blot, immunofluorescence and enzyme-linked immunosorbent assay (ELISA) analyses.Results: When compared with IS group, mechanical and thermal pain thresholds of the IS+EA group were significantly increased. Furthermore, EA prevented the enhancement of both spontaneous activity and evoked responses of second-order trigeminovascular neurons in TNC. Remarkable decreases in 5-HT7R mRNA expression and protein levels were detected in the IS+EA group. More importantly, 5-HT7R agonist AS19 impaired the antihyperalgesic effects of EA on p-PKA and p-ERK1/2. Injecting 5-HT7R antagonist SB-269970 into the intrathecal space of IS rats mimicked the effects of EA antihyperalgesia and inhibited p-PKA and p-ERK1/2. Conclusion: Our findings indicate that 5-HT7R mediates the antihyperalgesic effects of EA on IS-induced migraine pain by regulating PKA and ERK1/2 in TG and TNC.