With the development of society, the incidence of dementia and type 2 diabetes (T2DM) in the elderly has been increasing. Although the correlation between T2DM and mild cognitive impairment (MCI) has been confirmed in the previous literature, the interaction mechanism remains to be clarified. To explore the co-pathogenic genes in the blood of MCI and T2DM patients, clarify the correlation between T2DM and MCI, achieve the purpose of early disease prediction, and provide new ideas for the prevention and treatment of dementia. We downloaded T2DM and MCI microarray data from GEO databases and identified the differentially expressed genes associated with MCI and T2DM. We obtained co-expressed genes by intersecting differentially expressed genes. Then, we performed GO and KEGG enrichment analysis of co-DEGs. Next, we constructed the PPI network and found the hub genes in the network. By constructing the ROC curve of hub genes, the most valuable genes for diagnosis were obtained. Finally, the correlation between MCI and T2DM was clinically verified by means of a current situation investigation, and the hub gene was verified by qRT-PCR. A total of 214 co-DEGs were selected, 28 co-DEGs were up-regulated, and 90 co-DEGs were down-regulated. Functional enrichment analysis showed that co-DEGs were mainly enriched in metabolic diseases and some signaling pathways. The construction of the PPI network identified the hub genes in MCI and T2DM co-expression genes. We identified nine hub genes of co-DEGs, namely LNX2, BIRC6, ANKRD46, IRS1, TGFB1, APOA1, PSEN1, NPY, and ALDH2. Logistic regression analysis and person correlation analysis showed that T2DM was correlated with MCI, and T2DM increased the risk of cognitive impairment. The qRT-PCR results showed that the expressions of LNX2, BIRC6, ANKRD46, TGFB1, PSEN1, and ALDH2 were consistent with the results of bioinformatic analysis. This study screened the co-expressed genes of MCI and T2DM, which may provide new therapeutic targets for the diagnosis and treatment of diseases.