Background: Neuroinflammation is an important pathological mechanism of depression that leads to an increase in indoleamine-2,3-dioxygenase (IDO) activity and NMDAR activation. This study aimed to observe the effects of electroacupuncture on depressionlike behaviour in lipopolysaccharide (LPS)-treated rats and the underlying mechanism. Methods: Wistar rats were intraperitoneally administered LPS (0.5 mg/kg) for 7 consecutive days to establish a depression model. Electroacupuncture treatment was administered 1 hour after daily LPS injection. The open field test (OFT), forced swimming test (FST), and sucrose preference test (SPT) were used to evaluate the depressive-like behaviours. IL-1β, IL-6, and TNF-α levels were determined by enzyme-linked immunosorbent assay (ELISA); Trp, 5-hydroxytryptamine (5-HT), kynurenine (Kyn) and quinolinic acid (Quin) were detected by ultra-high-performance liquid chromatography-tandem mass spectrometry; and N-methyl-D-aspartate receptor (NMDAR) protein and mRNA were assessed by Western blot and real-time qPCR. Results: The results showed that electroacupuncture treatment successfully corrected LPSinduced depressive-like behaviour, reduced the inflammatory factor (IL-1β, IL-6 and TNF-α) levels in the blood and hippocampus, prevented IDO over-activation and recovered NR2B expression after challenge by LPS. Conclusion: Electroacupuncture treatment provided protection against LPS-induced depressive-like behaviour, and the associated mechanisms may be related to inhibiting the inflammatory response, regulating the IDO-mediated tryptophan-degrading pathway, and inhibiting NR2B activation.