Currently, the role of lncRNA in myocardial infarction (MI) is poorly understood. 17 co-expression modules were determined, specifically, the greenyellow, saddlebrown, grey60, royalblue, lightgreen, white, and pink modules were specifically expressed in the acute phase of MI, and brown, darkred, and royalblue, while greenyellow modules were specifically expressed in MI compared with CAD. 12 time-dependent of lncRNA/mRNA clusters with consistent expression trends were also identified. MI-associated modules were mainly enriched to immune, cell cycle, and metabolic pathways. We further obtained a network of 1816 lncRNA-mRNAs with higher expression correlations among these lncRNAs by analyzing the topological properties of the network. Herein, lncRNA RP11-847H18.2 and KLHL28, SPRTN, and EPM2AIP1 were determined as gene markers specifically expressed in MI, and they demonstrated a high predictive performance for MI diagnosis and prognosis. Three drugs, namely, Calcium citrate, Calcium Phosphate, and Calcium phosphate dihydrate, were identified as potential precursors of MI. Finally, gene and lncRNA diagnostic models were developed based on these genes and lncRNAs, with their AUCs averaged above 0.89 in both training and validation datasets. The findings of this study improve the diagnosis and prognosis of MI and personalized treatment of MI.