Baihe Jizihuang Tang (BHT) is a traditional Chinese medicine (TCM) prescription, which can also be used as a nutritional food with medicinal value. Herein, we aimed to clarify the antidepressive effects and molecular mechanism of BHT. Network pharmacological analysis; chronic unpredictable mild stress (CUMS) rat model assessment; behavioral tests; analysis of hippocampal neurotransmitter levels, hippocampal pathological structure, and hypothalamic-pituitary-adrenal (HPA) axis; western blot analysis; 16s RNA sequencing; ultraperformance liquid chromatography (UPLC)/mass spectrometry (MS); and high-performance liquid chromatography (HPLC)/ultraviolet (UV) analysis were used. We found 8 potentially active components and 12 targets from the database. KEGG analysis suggested that BHT significantly affected BDNF/tyrosine receptor kinase B levels, glutamate binding, synaptic transmission based on neurotransmitter signal, and the response to glucocorticoid signaling pathways. Consistently, 7 chemical components were identified using UPLC/quadrupole time-of-flight/MS; among them, regalosides A, B, C, and E were unique components of lily of TCM, and their content in BHT was significantly different: regaloside A > B > E > C. BHT could nourish hippocampal neurons, affect neurotransmitter metabolism, reduce HPA axis hyperactivity, improve deficits in hippocampal tissue structure, and change depressive behavior. Moreover, BHT regulated BDNF expression in the hippocampus and improved intestinal flora deficits in CUMS rats by changing the content of Bifidobacterium, Rothia, Glutamicibacter, and Lactobacillus at the genus level. Collectively, BHT attenuated CUMS-induced depression-like behavior by regulating BDNF and intestinal flora disorder through the brain-gut axis. Therefore, including BHT in the medication list may constitute a potential strategy for preventing depression.