Qiwei Baizhu Powder (QWBZP) is a traditional Chinese medicine formula for treating diarrhea induced by various causes. It elicits an anti-diarrheal effect by regulating the gut microbiota (diversity, structure, and abundance). However, the contribution of different components in the QWBZP decoction to this effect remains unclear. In this study, we used the QWBZP decoction as a reference standard to investigate the effects of total glycosides (TGs) extracted from QWBZP decoction on the gut microbiota and bile acid metabolism in mice with antibiotic-associated diarrhea (AAD). The results of 16S rRNA gene sequencing and liquid chromatography-mass spectrometry (LC-MS) analysis showed that the effect of total glycosides of Qiwei Baizhu Powder (QWBZP-TG) on specific intestinal bacteria and bile acids was similar to that of the QWBZP decoction, but the intensity of this effect was more significant in the case of QWBZP-TG. The QWBZP decoction and QWBZP-TG promoted the proliferation of Lactobacillus and inhibited the growth of Proteus, Clostridium, Eubacterium, Facklamia, and Escherichia in AAD mice. They also increased the levels of deoxycholic acid and beta-muricholic acid and decreased those of taurocholate acid, tauro-alpha-muricholic acid, and tauro-beta-muricholic acid in AAD mice. Lactobacillus was the key bacterial genus responding to QWBZP-TG. Thus, this study provides novel insights into the bioactive components of QWBZP and their contribution to its effects.