Objective To explore the mechanism by which Chaihu Shugan Powder inhibits LPS-induced inflammation in BV2 cells based on network pharmacology, molecular docking and in vitro experiments. Method The antidepressant mechanism of Chaihu Shugan Powder was predicted by network pharmacological analysis, and the key active ingredients were screened in combination with molecular docking technology. Further construct an LPS-induced inflammatory model of BV2 cells and provide intervention treatment with Chaihu Shugan Powder. The protein levels and mRNA expression levels of TNF-α, IL-1β, IL-6 and IL-10 in the cell supernatants and intracellular tissues of each group were detected by ELISA kits and qRT-PCR. The level of NO in the cell supernatant was detected by the Greiss method; The expressions of microglial polarization markers iNOS, CD86, CD206 and Arg-1, as well as key proteins of the TNF-α/NF-κB pathway in each group of cells were detected by Western blot. Result The results of network pharmacological analysis showed that a total of 118 intersection targets were obtained. Based on the degree value > 3 (median), 35 core targets were screened out, and the traceability analysis obtained 8 key components that played a role. The results of pathway enrichment indicated that the antidepressant effect of Bupleurum evacuation might be related to signaling pathways such as TNF, PI3K-Akt, Apoptosis and MAPK. The results of the CCK-8 experiment determined that the high, medium and low administration doses of Chaihu Shugan Powder were 125, 62.5 and 31.25μg/mL, respectively. The results of the Greiss method for detecting the NO level in the cell supernatant showed that different doses of Chaihu Shugan Powder could significantly reduce the release of NO induced by LPS ( P <0.001). ELISA and PCR results showed that the Chaihu Shugan Powder administration group could significantly adjust back the abnormal changes in the levels of various inflammatory factors ( P <0.001, P <0.01, P <0.05). The results of Western blot detection showed that compared with the Control group, the expressions of M1-type polarization markers iNOS and CD86 in microglia of the LPS group significantly increased ( P <0.001), while the expressions of M2-type polarization markers CD206 and Arg-1 significantly decreased ( P <0.001). The protein contents of TNF-α, TLR4, p-IKKα/β, p-IκBα, NF-κB p65 and c-fos proteins increased ( P <0.001); After treatment with Chaihu Shugan Powder, the abnormal expression of the above proteins could be significantly improved in all cases ( P <0.001, P <0.01, P <0.05). The findings from molecular docking indicated that all eight essential components demonstrated strong binding affinities with the proteins previously mentioned. Conclusion Chaihu Shugan Powder can exert an antidepressant effect by inhibiting the polarization of microglia to M1 type and regulating the TNF-α/NF-κB signaling pathway, thereby suppressing the expression of inflammatory factors.