This study was to explore the main material basis, target and pathway of Huangdi Anxiao capsule (HDAXC) for the treatment of type 2 diabetes mellitus (T2DM) by UPLC-Q-TOF-MSE and network pharmacology. In this study, HDAXC was administrated to T2DM rats, and its serum were detected by UPLC- Q-TOF-MSE, and the prototype components of HDAXC were analyzed. Using Swiss target prediction database to predict the target of serum prototype components, using GeneCards and DrugBack database to predict the target of T2DM. These common targets are the prediction target of HDAXC acting on T2DM. The key components of HDAXC in the treatment of T2DM were determined by using the software of Cytoscape3.7.2 to visualize the results. Using the STRING online platform to construct the protein-protein interaction (PPI), the key target genes were selected. The Gene Ontology (GO) analysis and Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway analysis of the common targets were carried out by using the OmicShare tools. And quantitative PCR and Western bolt were used to verify the related target genes. A toll of 28 prototype compounds were detected in rat serum, and 495 putative identified target genes were screened from HDAXC, of which 141 overlapped with the targets of T2DM and were considered potential therapeutic targets. The analysis of the network results showed that the key components of HDAXC are Magnoflorine, Galangin, Quercetin, and Epiberberine, etc. VEGFA, AKT1, SRC, EGFR might be the key target genes of HDAXC in the treatment of T2DM. HDAXC may have a therapeutic effect on T2DM by affecting HIF-1 signaling pathway, AGE-RAGE signaling pathway in diabetic complications, VEGFA signaling pathway and PI3K/AKT signaling pathways. In this study, compounds absorbed into the blood of HDAXC and its action target and pathway were preliminarily analyzed, which provided evidences for clarifying the chemical material basis and researching functional mechanism of HDAXC.