Wumei San (WMS) is a traditional Chinese medicine that has been widely applied in the treatment of piglet diarrhea (PD). However, the mechanism of WMS in PD has not been investigated. In this study, the main active compounds of WMS and the target proteins were obtained from the Traditional Chinese Medicine Systematic Pharmacology, PubChem, and SwissTargetPrediction databases. The molecular targets of PD were identified using GeneCards, OMIM, and NCBI databases. The common targets of WMS and PD were screened out and converted into UniProt gene symbols. PD-related target genes were constructed into a protein-protein interaction network, which was further analyzed by the STRING online database. Gene Ontology and the Kyoto Encyclopedia of Genes and Genomes enrichment analyses were performed to construct the component-target gene-disease network. Molecular docking was then used to examine the relationship between the core compounds and proteins. As a result, a total of 32 active compounds and 638 target genes of WMS were identified, and a WMS-compound-target network was successfully constructed. Through network pharmacology analysis, 14 core compounds in WMS that showed an effect on PD were identified. The targets revealed by GO and KEGG enrichment analysis were associated with the AGE-RAGE signaling pathway, PI3K-Akt signaling pathway, TNF signaling pathway, NOD-like receptor signaling pathway, IL-17 signaling pathway, and other pathways and physiological processes. Molecular docking analysis revealed that the active compounds in WMS spontaneously bind to their targets. The results indicated that WMS may regulate the local immune response and inflammatory factors mainly through the TNF signaling pathway, IL-17 signaling pathway, and other pathways. WMS is a promising treatment strategy for PD. This study provides new insights into the potential mechanism of WMS in PD.