Background: The number of diabetic patients worldwide continues to increase. Diabetes mellitus (DM) has become one of the three chronic diseases threatening human health. Mangiferin is a kind of xanthone with multiple biological activities. Studies have confirmed that it has good activity in treating DM. Objectives: The purpose of our study was to investigate the targets and mechanism of mangiferin in the treatment of DM and to analyze its metabolites in vivo. Materials and Methods: We predict the targets and mechanism of mangiferin in DM in view of network pharmacology (NP). Mangiferin's targets were completed using Gene Cards, Swiss Target Prediction, and TCMSP database. DisGeNET database retrieved DM-related targets. The common targets were put into STRING platform to construct a protein–protein interaction (PPI) network model. DAVID platform and Cytoscape were used to achieve GO analysis and KEGG signal pathway enrichment analysis. Then, in metabolites study, LC-MS/MS was used to analyze the metabolites of mangiferin in plasma collected from SD rats. Results: A total of 37 targets for the coaction of mangiferin and DM were screened. Tumor necrosis factor (TNF), epidermal growth factor (EGF), prostaglandin-endoperoxide synthase 2 (PTGS2), estrogen receptor 1 (ESR1), hypoxia-inducible factor-1 alpha (HIF1A), nuclear factor-κB p65 (RELA), protein kinase C alpha (PRKCA), and Interleukin-2 (IL2) were selected as the most important targets. The biological functions related to DM were mainly enriched in the signaling pathway in phosphoinositide 3-kinase (PI3K)-protein kinase B (Akt), mitogen-activated protein kinase (MAPK), nuclear factor-kappa B (NF-kappa B), hypoxia inducible factor-1 (HiF-1), and mammalian target of rapamycin (mTOR). With reference to the obtained accurate relative molecular mass, chromatographic retention behavior, and characteristic fragment ions, a total of six metabolites including the original drug were analyzed and identified. Conclusion: This study provides key data for the mechanism of action and targets research on mangiferin, and it provides a basis for its further development into hypoglycemic drugs.