The cardioprotective drugs used for treatment against ischemia/reperfusion (MI/R) injury have been well evaluated and are considered inadequate. The Chinese herbal medicine formula, Xinji pill (XJP) has been used traditionally for the prevention and treatment of ischemic heart diseases for decades. In the present study, the cardioprotective effects of XJP against MI/R injury were assessed in vivo and its possible mechanism was examined. Male Sprague‑Dawley rats were selected for establishing an MI/R model, which was induced by ischemia for 30 min followed by 24 h reperfusion. Drugs and saline were administered intragastrically from day 14 prior to MI/R. Blood samples were collected for biochemical detection. The rats were then sacrificed and cardiac muscle tissues were harvested. The mRNA expression levels of antioxidant genes were measured by reverse transcription‑quantitative polymerase chain reaction and the protein levels were measured by western blotting. Pretreatment with XJP for 14 days protected the heart against I/R‑induced myocardial function disorder, protected against heart injury, as demonstrated by normalized serum levels of lactate dehydrogenase and creatine kinase, and suppressed oxidative stress. XJP markedly upregulated the expression of antioxidant genes, including superoxide dismutase, catalase, glutathione reductase and glutathione peroxidase, and promoted the protein expression of heme oxygenase‑1 and NFE2‑related factor 2 (Nrf2) in the heart tissues. Furthermore, Akt kinase was confirmed to be upstream of Nrf2 in the XJP treatment. LY294002, a specific inhibitor of Akt, significantly eliminated the cardioprotective effects of XJP. In conclusion, these results demonstrated that XJP exhibited notable cardioprotective properties, in which the Akt/Nrf2 signaling pathway may be involved.