This study aims to decipher the mechanism of Buzhong Yiqi Decoction(BZYQD) in the treatment of spleen deficiency syndrome via gut microbiota. The mouse models of spleen deficiency syndrome were established by fecal microbiota transplantation(FMT, from patients with spleen deficiency syndrome) and administration of Sennae Folium(SF, 10 g·kg~(-1)), respectively, and treated with BZYQD for 5 d. The pseudosterile mice(administrated with large doses of antibiotics) and the mice transplanted with fecal bacteria from healthy human were taken as the controls. The levels of IgA, interleukin(IL)-2, IL-1β, interferon(IFN)-γ, tumor necrosis factor-alpha(TNF-α), and 5-hydroxytryptamine(5-HT) in the intestinal tissue of two models were measured by enzyme-linked immunosorbent assay, and the CD8~+/CD3~+ ratio was determined by flow cytometry. The composition and changes of the gut microbiota were determined by 16S rRNA high-throughput sequencing and qPCR. Furthermore, the correlation analysis was performed to study the mediating role of gut microbiota in the treatment. The results showed that BZYQD elevated the IgA level, lowered the IL-1β, TNF-α, and 5-HT levels, and decreased the CD8~+/CD3~+ ratio in the intestinal tissue of the two models. Moreover, BZYQD had two-way regulatory effects on the levels of IL-2 and IFN-γ. BZYQD inhibited the overgrowth and reduced the richness of gut microbiota in the SF model, and improved the gut microbiota structure in the two models. Algoriphagus, Mycobacterium, and CL500_29_marine_group were the common differential genera in the two models compared with the control. Acinetobacter, Parabacteroides, and Ruminococcus were the differential genera unique to the FMT model, and Sphingorhabdus, Lactobacillus, and Anaeroplasma were the unique differential genera in the SF model. BZYQD was capable of regulating all these genera. The qPCR results showed that BZYQD increased the relative abundance of Akkermansia muciniphila and decreased that of Bacteroides uniformis in the two models. The correlation analysis revealed that the levels of above intestinal cytokines were significantly correlated with characteristic gut microorganisms in different mo-dels. The IL-1β level had a significantly positive correlation with Acinetobacter and CL500_29_marine_group in the two models, while the different levels of IL-2 and IFN-γ in the two models may be related to its different gut microbiota structures. In conclusion, BZYQD could regulate the disordered gut microbiota structure in different animal models of spleen deficiency syndrome to improve the intestinal immune status, which might be one of the mechanisms of BZYQD in treating spleen deficiency syndrome.