Myocardial cell apoptosis is the main pathophysiological process underlying ischemia-reperfusion (I/R) injury. FoxO4, which was initially identified as a tumor suppressor that limits cell proliferation and induces apoptosis, plays diverse roles in cardiovascular diseases. However, its contribution to myocardial I/R injury remains unclear. The present study was undertaken to explore the role of FoxO4 in apoptosis during myocardial I/R injury and its underlying mechanisms in vivo. Rats were subjected to ligation/restoration of the left anterior descending branch of the coronary artery and 30 min of ischemia, followed by 4 h of reperfusion. Then, triphenyltetrazolium chloride (TTC) staining was performed to evaluate the infarct size. Transthoracic echocardiography was performed to evaluate cardiac function. Terminal deoxynucleotide transferase-mediated dUTP nick end-labeling (TUNEL) staining was performed to assess cell death in the myocardium. Real-time PCR was performed to measure FoxO4 mRNA expression. Western blots were performed to assess expression levels of the FoxO4 and cleaved caspase 3 proteins. Immunofluorescence staining was performed to measure cleaved caspase 3 expression levels. The hydroxylamine and TBA methods were performed to evaluate malondialdehyde (MDA) levels and superoxide dismutase (SOD) activity, respectively. Dihydroethidium (DHE) staining was performed to measure reactive oxygen species (ROS) generation. We successfully established a rat model of myocardial I/R injury and observed an increase in FoxO4 expression in the myocardium. FoxO4 knockdown significantly protected rats from myocardial I/R injury, as indicated by a marked decrease in infarct sizes and improvements in cardiac function. Mechanistically, I/R induced excessive oxidative stress in rat hearts, most likely as a result of increased FoxO4 levels, and these effects contributed to inducing apoptosis. In conclusion, the FoxO4/ROS pathway represents a potentially novel mechanism underlying apoptosis during myocardial I/R injury. Therapeutic strategies targeting FoxO4 might represent new treatments for myocardial I/R injury.