Since ferroptosis is considered to be a notable cause of cardiomyocyte death, inhibiting ferroptosis has become a novel strategy in reducing cardiac cell death and improving cardiopathic conditions. Therefore, the aim of the present study was to search for ferroptosis-related hub genes and determine their diagnostic value in myocardial infarction (MI) to aid in the diagnosis and treatment of the disease. A total of 10,286 DEGs were identified, including 6,822 upregulated and 3.464 downregulated genes in patients with MI compared with healthy controls. After overlapping with ferroptosis-related genes, 128 ferroptosis-related DEGs were obtained. WGCNA successfully identified a further eight functional modules, from which the blue module had the strongest correlation with MI. Blue module genes and ferroptosis-related differentially expressed genes were overlapped to obtain 20 ferroptosis-related genes associated with MI. Go and KEGG analysis showed that these genes were mainly enriched in cellular response to chemical stress, trans complex, transferring, phosphorus-containing groups, protein serine/threonine kinase activity, FoxO signaling pathway. Hub genes were obtained from 20 ferroptosis-related genes through the PPI network. The expression of hub genes was found to be down-regulated in the MI group. Finally, the miRNAs-hub genes and TFs-hub genes networks were constructed. The GSE141512 dataset and the use of RT-qPCR assays on patient blood samples were used to confirm these results. The results showed that ATM, PIK3CA, MAPK8, KRAS and SIRT1 may play key roles in the development of MI, and could therefore be novel markers or targets for the diagnosis or treatment of MI.