Qiwei Baizhu Powder (QWBZP) has been proven effective in treating antibiotic-associated diarrhea (AAD), and the mechanism is associated with regulating the gut microbiota. However, the role of the bioactive compounds of QWBZP in regulating the gut microbiota is still unclear. In this study, 24 mice were divided into a normal control group (N), a model group (R), a QWBZP decoction group (TW), and a QWBZP-TG group (TG). AAD mouse models were established by mixed antibiotic administration. After modeling, mice in the TW group and TG group were treated with QWBZP decoction and QWBZP-TG, respectively. Mice in the N group and R group were gavaged with sterile water. 16S rRNA gene sequencing was used to investigate the changes of mucosa-associated microbiota (MAM) in the small intestine of mice. Moreover, the levels of diamine oxidase (DAO), D-Lactate, secretory immunoglobulin A (sIgA), interleukin 6 (IL-6), IL-10, and tumor necrosis factor-α (TNF-α) were detected using enzyme-linked immunosorbent assay (ELISA) kits. The results showed that QWBZP-TG significantly altered the diversity, structure, and abundance of MAM in the AAD mice. QWBZP-TG exerted a stronger suppression effect on Escherichia and Clostridium compared with QWBZP decoction. Meanwhile, QWBZP-TG downregulated the abundance of Lactobacillus, which elicited an opposite effect to QWBZP decoction. Prevotella was the signature bacteria that responded to the QWBZP-TG intervention. Furthermore, both QWBZP decoction and QWBZP-TG decreased the levels of DAO, D-Lactate, sIgA, IL-6, and TNF-α in the AAD mice. The role of glycosides is to help QWBZP ameliorate diarrhea symptoms by inhibiting the proliferation of diarrhea-associated bacteria, reducing inflammation and regulating immunity.