Background: Hyperalgesic priming (HP) is a model of the transition from acute to chronic pain. Electroacupuncture (EA) could inhibit pain development through the peripheral dorsal root ganglia; however, it is unclear whether it can mitigate the transition from acute to chronic pain by attenuating protein expression in the p38 MAPK (mitogen-activated protein kinase)/tumour necrosis factor alpha (TNF-α) pathway in the spinal dorsal horn. Aims: We aimed to determine whether EA could prevent the transition from acute to chronic pain by affecting the p38 MAPK/TNF-α pathway in the spinal dorsal horn in a rat model established using HP. Methods: We first randomly subdivided 30 male Sprague-Dawley (SD) rats into 5 groups ( n = 6 per group): control (N), sham HP (Sham-HP), HP, HP + SB203580p38 MAPK (HP+SB203580), and HP + Lenalidomide (CC-5013) (HP+Lenalidomide). We then randomly subdivided a further 30 male SD rats into 5 groups ( n = 6 per group): Sham-HP, HP, sham EA (Sham EA), EA (EA), and EA + U-46619 p38 MAPK agonist (EA+U-46619). We assessed the effects of EA on the mechanical paw withdrawal threshold and p38 MAPK/TNF-α expression in the spinal dorsal horn of rats subjected to chronic inflammatory pain. Results: Rats in the EA group had reduced p38 MAPK and TNF-α expression and had significantly reduced mechanical hyperalgesia compared with rats in the other groups. Conclusion: Our findings indicate that EA could increase the mechanical pain threshold in rats and inhibit the transition from acute pain to chronic pain. This mechanism could involve reduced p38 MAPK/TNF-α expression in the spinal dorsal horn.