Depression is a highly prevalent and heterogeneous disorder that requires new strategies to overcome depression. In this study, we aimed to investigate whether leonurine modulated hippocampal nerve regeneration in chronic and unpredictable mild stress (CUMS) rats through the SHH/GLI signaling pathway and restoring gut microbiota and microbial metabolic homeostasis. The CUMS rat model was constructed and treated with leonurine. The body weight of rats was recorded, and a series of tests were performed. Western blot was utilized to measure the expression of BDNF and 5-HT in the hippocampus. Then the expression of SHH, GLI, PTCH, and SMO were measured by qRT-PCR and western blot. The colocalization of BrdU+DCX and BrdU+NeuN was evaluated by IF. 16S rDNA high-throughput sequencing was applied to detect the composition and distribution of gut microbiota. The differential metabolites were analyzed by untargeted metabolomics. The correlation between gut microbiota and microbial metabolites was analyzed by Pearson correlation coefficient. After CUMS modeling, the body weight of rats was decreased, and the expression of BDNF and 5-HT were decreased, while the body weight was recovered, and the expression of BDNF and 5-HT were increased after leonurine treatment. Leonurine reversed the reduction in the colocalization of BrdU+DCX and BrdU+NeuN and the reduction in the levels of SHH, GLI, PTCH, and SMO induced by CUMS modeling. Leonurine also restored gut microbiota and microbial metabolites homeostasis in CUMS rats. Furthermore, Prevotellaceae_Ga6A1_group was negatively correlated with 3-Oxocholic acid, nutriacholic acid, and cholic acid. Collectively, leonurine regulated hippocampal nerve regeneration in CUMS rats by activating the SHH/GLI signaling pathway and restoring gut microbiota and microbial metabolic homeostasis.