Objective. This study is aimed at analyzing the molecular mechanism of Xuanfei Baidu Granule (XFBDG) in the treatment of intestinal flora disorder based on network pharmacology. Methods. The TCMSP database was used to obtain the active components and target proteins of XFBDG, while the GeneCards database was used to obtain the related proteins of intestinal flora disorder. The Rx64 4.0.2 software was used to analyze the GO functional enrichment and KEGG pathway enrichment of drug component target protein and disease-related protein to obtain the pathway-enriched proteins and screen the core proteins for topology analysis of the pathway target by using the STRING database and Cytoscape v3.8.2 software. The Cytoscape v3.8.2 software was used to analyze the relationship between each component and enriched protein, and the AutoDock Vina software was used for molecular docking of core proteins and components. Results. XFBDG contains 133 active components that can act on 249 proteins related to intestinal flora disorder. The effects include the following: (i) regulation of functions—the response to drug, cellular response to chemical stress, response to oxidative stress, and RNA polymerase II-specific DNA-binding transcription factor binding and (ii) regulation of signaling pathways such as the IL-17 signaling pathway, TNF signaling pathway, and Th17 cell differentiation pathway. The enriched core proteins in these pathways are IFNG, IL4, PTGS2, JUN, and IL1B that set in a higher level of binding with the corresponding drug components. Conclusion. XFBDG can act on IFNG, IL4, PTGS2, JUN, and IL1B proteins through its active components such as quercetin, luteolin, and kaempferol to regulate the IL-17, TNF, and Th17 cell differentiation pathways and further regulate the response to drug, cellular response to chemical stress, response to oxidative stress, and RNA polymerase II-specific DNA-binding transcription factor binding. In addition, owing to its antioxidant and anti-inflammatory properties and related immune responses, XFBDG can achieve a balance of intestinal flora and microbial metabolism.