BACKGROUND: The identification of inflammatory genes linked to coronary artery disease (CAD) helps to enhance our understanding of the disease's pathogenesis and facilitate the identification of novel therapeutic targets. METHODS: Inflammation-related genes (IRGs) were downloaded from the Msigdb database. Differentially expressed genes (DEGs) were determined by comparing CAD group with the control group in the GSE113079 and GSE12288 datasets. Key module genes associated with CAD were identified through weighted gene co-expression network analysis (WGCNA). Differentially expressed IRGs (DE-IRGs) were established by intersecting the DEGs, key module genes, and IRGs. Feature genes were derived using machine learning techniques. Mendelian randomization (MR) analysis was conducted to explore the causal relationship between CAD and the identified feature genes. Subsequently, a logistic regression model and an alignment diagram model were developed to predict the incidence of CAD. RESULTS: In the given datasets, a total of 92 DE-IRGs were identified. Furthermore, twelve feature genes were discerned utilizing four distinct machine learning algorithms. Notably, two pivotal genes, HIF1A (odds ratio (OR) = 1.031, CONCLUSION: The identification of