Chronic low-grade inflammation of the pancreatic islets is the characteristic of type 2 diabetes (T2D), and some of the immune checkpoints may play important roles in the pancreatic islet inflammation. Thus, we aim to explore the immune checkpoint genes (ICGs) associated with T2D, thereby revealing the role of ICGs in the pathogenesis of T2D based on bioinformatic analyses. Differentially expressed genes (DEGs) and immune checkpoint genes (ICGs) of islets between T2D and control group were screened from datasets of the Gene Expression Omnibus (GEO). A risk model was built based on the coefficients of ICGs calculated by ridge regression. Functional enrichment analysis and immune cell infiltration estimation were conducted. Correlations between ICGs and hub genes, T2D-related disease genes, insulin secretion genes, and beta cell function-related genes were analyzed. Finally, we conducted RT-PCR to verify the expression of these ICGs. In total, pancreatic islets from 19 cases of T2D and 84 healthy subjects were included. We identified 458 DEGs. Six significantly upregulated ICGs (CD44, CD47, HAVCR2, SIRPA, TNFSF9, and VTCN1) in T2D were screened out. These ICGs were significantly correlated with several hub genes and T2D-related genes; furthermore, they were correlated with insulin secretion and β cell function-related genes. The analysis of immune infiltration showed that the concentrations of eosinophils, T cells CD4 naive, and T cells regulatory (Tregs) were significantly higher, but CD4 memory resting T cells and monocytes were lower in islets of T2D patients. The infiltrated immune cells in T2D pancreatic islet were associated with these six ICGs. Finally, the expression levels of four ICGs were confirmed by RT-PCR, and three ICGs were validated in another independent dataset. In conclusion, the identified ICGs may play an important role in T2D. Identification of these differential genes may provide new clues for the diagnosis and treatment of T2D.