Myocardial ischemia is one of the main causes of sudden cardiac death worldwide. Depending on the cell type and stimulus, ERK activity mediates different anti-proliferative events, such as apoptosis, autophagy, and senescence. The aim of this study was to determine the protective effect of 1,4-diamino-2,3-dicyano-1,4-bis[2-aminophenylthio] butadiene (U0126), an ERK kinase inhibitor, on myocardial ischemia/reperfusion (I/R) injury and the mechanisms involved. An I/R model was established in vivo in C57BL/6 mice and in vitro using mouse cardiomyocytes, respectively. To evaluate the protective effects of U0126 on I/R injury, we measured the myocardial infarct area, apoptosis, and autophagy. Our data indicated that pretreatment with U0126 significantly reduced the infarct area caused by I/R. Moreover, U0126 reduced the caspase-3 activity and the number of TUNEL-positive cardiomyocytes, which together indicate decreased apoptosis. Additionally, U0126 remarkable reduced the level of Beclin-1 and LC3 and increased p62 expression, which indicates that U0126 suppressed H/R-induced autophagy. Furthermore, the relationship between U0126 and MEK/ERK pathway activation in H/R-induced cardiomyocytes was also investigated. U0126 ameliorated H/R injury through inhibition of the MEK/ERK pathway and by suppressing in the downstream EGR-1 expression. Together, our research suggests that U0126 may protect against H/R injury by preventing H/R-induced myocardium apoptosis and autophagy via the MEK/ERK/EGR-1 pathway, and may be a potential therapeutic approach for attenuating myocardial I/R injury.