Wumei pills (WMP), a classical Chinese herbal formula, have shown efficacy in the treatment of ulcerative colitis (UC) and type 2 diabetes (T2DM). However, the underlying mechanisms by which WMP simultaneously targets these distinct diseases remain unclear. In this study, a network pharmacology approach was employed to unravel the potential molecular mechanisms of WMP in UC and T2DM treatment. This analysis provides a bioinformatics foundation for the traditional Chinese medicine concept of “treating different diseases with the same treatment.” WMP was found to contain 65 active components, including flavonoids, sterols, and alkaloids, that act on 228 shared targets for UC and T2DM. Network analysis identified 5 core compounds (Quercetin, Kaempferol, beta-Sitosterol, Isocorypalmine, Stigmasterol) and 8 core proteins (AKT1, ESR1, TP53, IL6, JUN, MYC, TNF, EGFR) that play pivotal roles in the treatment of UC and T2DM by WMP. WMP exerts its therapeutic effects by modulating signaling pathways, including the NF-κB pathway, PI3K-Akt pathway, and p53 pathway. Molecular docking results indicate a strong binding affinity between core compounds and core genes. This study bridges the understanding of 2 diseases using network pharmacology and provides insights into shared therapeutic mechanisms, opening doors for further research in modern Chinese herbal formulations.