Background: Depression is a typical psychosomatic disease. Shuganheweitang (SGHWT) is a clinical formula that effectively treats depression. However, the potential mechanism used by SGHWT to ameliorate depression-like behaviors is still unclear. This study investigated the effects of SGHWT on metabolic change in the liver and hypothalamus with signaling pathways involved in chronic unpredictable mild stress (CUMS)-induced depression in rats to explore the mechanism of the anti-depressive effect. Methods: A total of 52 rats were used to create a model of depression by CUMS combined with solitary rearing for 6 weeks. Open field test (OFT), sucrose preference test (SPT), forced swim test (FST), and body weight (BW) were performed to analyze the pharmacodynamic effects of SGHWT. H&E staining, Nissl staining, immunofluorescence, immunohistochemistry, and western blot were used to evaluate the mechanism of action. Untargeted metabolomics techniques by ultra-performance liquid chromatography-quantitative time-of-flight tandem mass spectrometry (UPLC-Q-TOF-MS/MS) were used to analyze all the metabolic differences in the liver and hypothalamus. Results: SGHWT improved CUMS-induced depression-like behaviors in vivo. SGHWT reduced hepatic