Background: Islet dysfunction is the main pathological process of type 2 diabetes mellitus (T2DM). Fibrosis causes islet dysfunction, but the current mechanism is still unclear. Here, bioinformatics analysis identified gene clusters closely related to T2DM and differentially expressed genes related to fibrosis, and animal models verified the roles of these genes.Methods: Human islet transcriptomic datasets were obtained from the Gene Expression Omnibus (GEO), and weighted gene coexpression network analysis (WGCNA) was applied to screen the key gene modules related to T2DM and analyze the correlations between the modules and clinical characteristics. Enrichment analysis was performed to identify the functions and pathways of the key module genes. WGCNA, protein-protein interaction (PPI) analysis and receiver operating characteristic (ROC) curve analysis were used to screen the hub genes. The hub genes were verified in another GEO dataset, the islets of high-fat diet (HFD)-fed Sprague-Dawley rats were observed by H&E and Masson’s trichrome staining, the fibrotic proteins were verified by immunofluorescence, and the hub genes were tested by immunohistochemistry.Results: The top 5,000 genes were selected according to the median absolute deviation, and 18 modules were analyzed. The yellow module was highly associated with T2DM, and its positive correlation with glycated hemoglobin (HbA1c) was significantly stronger than that with body mass index (BMI). Enrichment analysis revealed that extracellular matrix organization, the collagen-containing extracellular matrix and cytokine−cytokine receptor interaction might influence T2DM progression. The top three hub genes, interleukin 6 (IL6), IL11 and prostaglandin-endoperoxide synthase 2 (PTGS2), showed upregulated expression in T2DM. In the validation dataset, IL6, IL11, and PTGS2 levels were upregulated in T2DM, and IL6 and PTGS2 expression was positively correlated with HbA1c and BMI; however, IL11 was positively correlated only with HbA1c. In HFD-fed Sprague-Dawley rats, the positive of IL6 and IL11 in islets was stronger, but PTGS2 expression was not significantly altered. The extent of fibrosis, irregular cellular arrangement and positive actin alpha 2 (ACTA2) staining in islets was significantly greater in HFD-fed rats than in normal diet-fed rats.Conclusion: Glucotoxicity is a major factor leading to increased IL6 and IL11 expression, and IL6-and IL11-induced fibrosis might be involved in islet dysfunction.