Buzhong Yiqi Decoction, traditionally used in China for the treatment of diarrhea, is extracted from Astragalus, Atractylodes macrocephala, Tangerine peel, Bupleurum, Ginseng, Cimicifuga, Licorice, and Chinese Angelica. However, the precise mechanisms underlying its therapeutic effects remain inadequately understood. Considering that dysbiosis of the gut microbiota may contribute to diarrhea, and that oral administration of the decoction exhibits limited intestinal absorption, we propose that the modulation of gut microbiota plays a crucial role in its anti-diarrheal efficacy. To validate this hypothesis, we established a canine diarrhea model by administering Senna decoction, followed by treatment with Buzhong Yiqi Decoction. Diarrhea rates, complete blood counts, serum biochemistry, serum antioxidant levels, and D-xylose absorption were measured. The alteration of gut microbiota was examined through 16S rDNA high-throughput sequencing. Compared with the model group, after treatment with the decoction, the levels of white blood cells and superoxide dismutase in the dogs significantly decreased (P<0.05), while the levels of D-xylose and malondialdehyde significantly increased (P<0.05). The intestinal flora results showed that, compared with the control group, the relative abundance of Firmicutes and Actinobacteria decreased in the model group, while the relative abundance of Proteobacteria and Bacteroidetes significantly increased. At the genus level, compared with the control group, the relative abundance of unclassified Ruminococcaceae, Collinsella, and Fusobacterium in the model group significantly decreased, while the relative abundance of Shigella and Anaeroplasma significantly increased. In conclusion, Buzhong Yiqi Decoction has a therapeutic effect on dogs with diarrhea, primarily through reducing diarrhea rate, exerting anti-inflammatory and antioxidant effects, and regulating the intestinal flora.