BackgroundASCVD is the primary cause of mortality in individuals with T2DM. A potential link between ASCVD and T2DM has been suggested, prompting further investigation.MethodsWe utilized linear and multivariate logistic regression, Wilcoxon test, and Spearman’s correlation toanalyzethe interrelation between ASCVD and T2DM in NHANES data from 2001-2018.The Gene Expression Omnibus (GEO) database and Weighted Gene Co-expression Network Analysis (WGCNA) wereconducted to identify co-expression networks between ASCVD and T2DM. Hub genes were identified using LASSO regression analysis and further validated in two additional cohorts. Bioinformatics methods were employed for gene ontology and Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway enrichment analysis, along with the prediction of candidate small molecules.ResultsOur analysis of the NHANES dataset indicated a significant impact of blood glucose on lipid levels within diabetic cohort, suggesting that abnormal lipid metabolism is a critical factor in ASCVD development. Cross-phenotyping analysis revealed two pivotal genes, ABCC5 and WDR7, associated with both T2DM and ASCVD. Enrichment analyses demonstrated the intertwining of lipid metabolism in both conditions, encompassing adipocytokine signaling pathway, fatty acid degradation and metabolism, and the regulation of adipocyte lipolysis. Immune infiltration analysis underscored the involvement of immune processes in both diseases. Notably, RITA, ON-01910, doxercalciferol, and topiramate emerged as potential therapeutic agents for both T2DM and ASCVD, indicating their possible clinical significance.ConclusionOur findings pinpoint ABCC5 and WDR7 as new target genes between T2DM and ASCVD, with RITA, ON-01910, doxercalciferol, and topiramate highlighted as promising therapeutic agents.