BackgroundMyocardial infarction (MI) ranks among the most prevalent cardiovascular diseases. Insufficient blood flow to the coronary arteries always leads to ischemic necrosis of the cardiac muscle. However, the mechanism of myocardial injury after MI remains unclear. This article aims to explore the potential common genes between mitophagy and MI and to construct a suitable prediction model.MethodsTwo Gene Expression Omnibus (GEO) datasets (GSE62646 and GSE59867) were used to screen the differential expression genes in peripheral blood. SVM, RF, and LASSO algorithm were employed to find MI and mitophagy-related genes. Moreover, DT, KNN, RF, SVM and LR were conducted to build the binary models, and screened the best model to further external validation (GSE61144) and internal validation (10-fold cross validation and Bootstrap), respectively. The performance of various machine learning models was compared. In addition, immune cell infiltration correlation analysis was conducted with MCP-Counter and CIBERSORT.ResultsWe finally identified ATG5, TOMM20, MFN2 transcriptionally differed between MI and stable coronary artery diseases. Both internal and external validation supported that these three genes could accurately predict MI withAUC = 0.914 and 0.930 by logistic regression, respectively. Additionally, functional analysis suggested that monocytes and neutrophils might be involved in mitochondrial autophagy after myocardial infarction.ConclusionThe data showed that the transcritional levels of ATG5, TOMM20 and MFN2 in patients with MI were significantly different from the control group, which might be helpful to further accurately diagnose diseases and have potential application value in clinical practice.