Objective: To identify the anti-depressive effect of ferulic acid (FA) in mice exposed to lipopolysaccharide (LPS) and explore its molecular mechanisms. Methods: The mice were divided into 5 groups as follows: Control, LPS, LPS + SP, LPS + FA, and LPS + FA + anisomycin. The LPS + FA and LPS + FA + anisomycin groups were administered with FA (100 mg/kg, i.p.) once daily continuously for 7 days, and the other groups received an equivalent volume of saline. On the 7th day, LPS (0.1 mg/mL, i.p.) was injected in all mice except the control group 30 min after FA or saline administration. The LPS + SP and LPS + FA + anisomycin groups were intravenously administered with SP600125 [c-Jun N-terminal kinase (JNK) inhibitor] (100 μL/ site, i.v.) and anisomycin (JNK activator) (100 μL/site, i.v.) 15 min before LPS, respectively. The depressive behaviors were assessed by open field test, sucrose preference test, and forced swimming test at 24 h post-LPS administration. Tumor necrosis factor-α (TNF-α) and interleukin-1β (IL-1β) levels in plasma were measured by ELISA. The levels of phospho-JNK, TNF-α, IL-1β, Bcl-2, Bax, cytochrome c and caspase-3 were evaluated by Western blotting. Results: FA alleviated depression symptoms caused by LPS in mice, including increasing sucrose water consumption in sucrose preference test and reducing the immobility time in forced swimming test. FA could inhibit upregulated levels of phospho-JNK, TNF-α, and IL-1β. FA also markedly decreased Bax, caspase-3, and cytochrome c, and increased Bcl-2 levels. Besides, SP600125 showed neuroprotective effect similar to FA which was attenuated by anisomycin. Conclusions: FA attenuates inflammation and apoptosis by inhibiting LPS.