Clinical studies and basic science experiments have widely demonstrated the antidepressant and anxiolytic effects of the herbal formula Xiao-Yao-San (XYS). However, the system mechanism of these effects has not been fully characterized. The present study conducted a comprehensive network pharmacological analysis of XYS and sorted all pharmacologically active components (149) through the TCMSP webserver. Then, all potential molecular targets (449) were predicted, of which there were 99 genes clearly related to depression. To further investigate the mechanism of antidepressant effects of XYS, a compound-depression targets (C-DTs) network was constructed, and Gene Ontology (GO) functional and KEGG pathway enrichment analyses were performed for the 99 targets. Enrichment results revealed that XYS could regulate multiple aspects of depression through these targets, related to metabolism, neuroendocrine function, and neuroimmunity. Prediction and analysis of protein-protein interactions resulted in selection of three hub genes (AKT1, TP53, and VEGFA). In addition, a total of seven ingredients from XYS could act on these hub genes and they were identified through ultra-high-performance liquid chromatography-quadrupole time-of-flight mass spectrometry (UPLC-Q/TOF-MS), including paeoniflorin, quercetin, luteolin, acacetin, aloe-emodin, Glyasperin C, kaempferol. Hereafter, we investigated the effects of paeoniflorin and its predicted target, the results suggest that it can reverse the neurotoxicity produced by CORT and could be a neuroprotective effect by promoting the phosphorylation of Akt. Overall, our research revealed the complicated antidepressant mechanism of XYS, and also provided a rational strategy for revealing the complex composition and function of Chinese herbal formula.