BackgroundMyocardial infarction is a well-established severe consequence of coronary artery disease. However, the lack of effective early biomarkers accounts for the lag time before clinical diagnosis of myocardial infarction. The present study aimed to predict critical genes for the diagnosis of MI by immune infiltration analysis and establish a nomogram.MethodsGene microarray data were downloaded from Gene Expression Omnibus (GEO). Differential expression analysis, single-cell sequencing, and disease ontology (DO) enrichment analysis were performed to determine the distribution of Differentially Expressed Genes (DEGs) in cell subpopulations and their correlation with MI. Next, the level of infiltration of 16 immune cells and immune functions and their hub genes were analyzed using a Single-sample Gene Set Enrichment Analysis (ssGSEA). In addition, the accuracy of critical markers for the diagnosis of MI was subsequently assessed using receiver operating characteristic curves (ROC). One datasets were used to test the accuracy of the model. Finally, the genes with the most diagnostic value for MI were screened and experimentally validated.Results335 DEGs were identified in GSE66360, including 280 upregulated and 55 downregulated genes. Single-cell sequencing results demonstrated that DEGs were mainly distributed in endothelial cells. DO enrichment analysis suggested that DEGs were highly correlated with MI. In the MI population, macrophages, neutrophils, CCR, and Parainflammation were significantly upregulated compared to the average population. NR4A2 was identified as the gene with the most significant diagnostic value in the immune scoring and diagnostic model. 191 possible drugs for the treatment of myocardial infarction were identified by drug prediction analysis. Finally, our results were validated by Real-time Quantitativepolymerase chain reaction and Western Blot of animal samples.ConclusionOur comprehensive in silico analysis revealed that NR4A2 has huge prospects for application in diagnosing patients with MI.