BackgroundType 2 diabetes (T2D) is a common chronic disease with many serious complications. Celastrol can prevent and treat type 2 diabetes by reversing insulin resistance in a number of ways. However, the specific mechanisms by which celastrol prevents and treats T2D are not well understood. The aim of this study was to explore the key gene targets and potential signaling pathway mechanisms of celastrol for the treatment of T2D.MethodsGSE184050 was downloaded from the Gene Expression Omnibus online database. Blood samples from patients and healthy individuals with T2D were analyzed to identify differentially expressed genes (DEGs), and a protein−protein interaction network (PPI) was constructed. Key gene analysis of DEGs was performed using the MCODE plugin in Cystoscope as well as the Hubba plugin, and intersections were taken to obtain hub genes, which were displayed using a Venn diagram. Enrichment analysis was then performed via the ClueGo plugin in Cytoscape and validated using Gene Set Enrichment Analysis. The therapeutic targets of celastrol were then analyzed by pharmacophore network pharmacology, intersected to identify the therapeutic targets of celastrol, enriched for all targets, and intersected to obtain the signaling pathways for celastrol treatment. The protein structures of the therapeutic targets were predicted using the artificial intelligence AlphaFold2. Finally, molecular docking was used to verify whether celastrol could be successfully docked to the predicted targets.Results618 DEGs were obtained, and 9 hub genes for T2D were identified by the MCODE and Hubba plug-ins, including ADAMTS15, ADAMTS7, ADAMTSL1, SEMA5B, ADAMTS8, THBS2, HBB, HBD and HBG2. The DEG-enriched signaling pathways mainly included the ferroptosis and TGF-beta signaling pathways. A total of 228 target genes were annotated by pharmacophore target analysis, and the therapeutic targets were identified, including S100A11, RBP3, HBB, BMP7 and IQUB, and 9 therapeutic signaling pathways were obtained by an intersectional set. The protein structures of the therapeutic targets were successfully predicted by AlphaFold2, and docking was validated using molecular docking.ConclusionCelastrol may prevent and treat T2D through key target genes, such as HBB, as well as signaling pathways, such as the TGF-beta signaling pathway and type II diabetes mellitus.