Depression can trigger an inflammatory response that affects the immune system, leading to the development of other diseases related to inflammation. Xiao-Yao-San (XYS) is a commonly used formula in clinical practice for treating depression. However, it remains unclear whether XYS has a modulating effect on the inflammatory response associated with depression. The objective of this study was to examine the role and mechanism of XYS in regulating the anti-inflammatory response in depression. A chronic unpredictable mild stress (CUMS) mouse model was established to evaluate the antidepressant inflammatory effects of XYS. Metabolomic assays and network pharmacology were utilized to analyze the pathways and targets associated with XYS in its antidepressant inflammatory effects. In addition, molecular docking, immunohistochemistry, Real-Time Quantitative Polymerase Chain Reaction (RT-qPCR), and Western Blot were performed to verify the expression of relevant core targets. The results showed that XYS significantly improved depressive behavior and attenuated the inflammatory response in CUMS mice. Metabolomic analysis revealed the reversible modulation of 21 differential metabolites by XYS in treating depression-related inflammation. Through the combination of liquid chromatography and network pharmacology, we identified seven active ingredients and seven key genes. Furthermore, integrating the predictions from network pharmacology and the findings from metabolomic analysis, Vascular Endothelial Growth Factor A (VEGFA) and Peroxisome Proliferator-Activated Receptor-γ (PPARG) were identified as the core targets. Molecular docking and related molecular experiments confirmed these results. The present study employed metabolomics and network pharmacology analyses to provide evidence that XYS has the ability to alleviate the inflammatory response in depression through the modulation of multiple metabolic pathways and targets.