Background. Acute myocardial infarction (AMI) is one of the most critical conditions of coronary heart disease with many uncertainties regarding reduction of ischemia/reperfusion injury, medical treatment strategies, and other aspects. The inflammatory immune response has a bidirectional regulatory role in AMI and plays an essential role in myocardial remodeling after AMI. The purpose of our research was tantamount to explore possible mechanisms of AMI and to analyze the relationship with the immune microenvironment. Methods. We firstly analyzed the expression profile of GSE61144 and HADb to identify differentially expressed autophagy-related genes (DEARGs). Then, we performed GO, functional enrichment analysis, and constructed PPI network by Metascape. A lncRNA-miRNA-mRNA ceRNA network was built, and hub genes were extracted by Cytoscape. After that, we used CIBERSORT algorithm to estimate the proportion of immunocytes, followed by correlation analysis to find relationships between hub DEARGs and immunocyte subsets. Finally, we verified those hub genes in another dataset and cellular experiments qPCR. Results. Compared with controls, we identified 44 DEARGs and then filtered the genes of MCODE by constructing PPI network for further analysis. A total of 45 lncRNAs, 24 miRNAs, 19 mRNAs, 162 lncRNA-miRNA pairs, and 37 mRNA-miRNA pairs were used to construct a ceRNA network, and 4 hub DEARGs (BCL2, MAPK1, RAF1, and PRKAR1A) were extracted. We then estimated 5 classes of immunocytes that differed between AMI and controls. According to the results of correlation analysis, these 4 hub DEARGs may play modulatory effects in immune infiltrating cells, notably in CD8+ T cells and neutrophils. Finally, the same results were verified in GSE60993 and qPCR experiments. Conclusion. Our findings suggest that those hub DEARGs (BCL2, MAPK1, RAF1, and PRKAR1A) and immunocytes probably play functions in the progression of AMI, providing potential diagnostic markers and new perspectives for treatment of AMI.