Young patients with type 2 diabetes and myocardial infarction (MI) have higher long-term all-cause and cardiovascular mortality. In addition, the observed increased, mildly abnormal baseline lipid levels, but not lipid variability, are associated with an increased risk of atherosclerotic cardiovascular disease events, particularly MI. This study investigated differentially expressed genes (DEGs), which might be potential targets for young patients with MI and a high-fat diet (HFD). GSE114695 and GSE69187 were downloaded and processed using the limma package. A Venn diagram was applied to identify the same DEGs, and further pathway analysis was performed using Metascape. Protein-protein interaction (PPI) network analysis was then applied, and the hub genes were screened out. Pivotal miRNAs were predicted and validated using the miRNA dataset in GSE114695. To investigate the cardiac function of the screened genes, an MI mouse model, echocardiogram, and ELISA of hub genes were applied, and a correlation analysis was also performed. From aged mice fed HFD, 138 DEGs were extracted. From aged mice fed with chow, 227 DEGs were extracted. Pathway enrichment analysis revealed that DEGs in aging mice fed HFD were enriched in lipid transport and lipid biosynthetic process 1 d after MI and in the MAPK signaling pathway at 1 w after MI, suggesting that HFD has less effect on aging with MI. A total of 148 DEGs were extracted from the intersection between plaques fed with HFD and chow in young mice and MI_1d, respectively, which demonstrated increased inflammatory and adaptive immune responses, in addition to myeloid leukocyte activation. A total of 183 DEGs were screened out between plaques fed with HFD vs. chow in young mice and MI_1w, respectively, which were mainly enriched in inflammatory response, cytokine production, and myeloid leukocyte activation. After validation, PAK3, CD44, CD5, SOCS3, VAV1, and PIK3CD were demonstrated to be negatively correlated with LVEF; however, P2RY1 was demonstrated to be positively correlated. This study demonstrated that the screened hub genes may be therapeutic targets for treating STEMI patients and preventing MI recurrence, especially in young MI patients with HFD or diabetes.