Apigenin (Api) is a plant monomer associated with reducing the risk of heart disease. However, the mechanism of action remains to be fully elucidated. In the present study, it was hypothesized that API has cardioprotective effects by attenuating myocardial ischemia/reperfusion (I/R) injury. Rats were randomly subjected to sham operation, myocardial I/R alone or I/R + Api. Cardiac function was measured, and infarct size was evaluated by triphenyltetrazolium chloride staining following reperfusion. The myocardial enzyme leakage was analyzed for lactate dehydrogenase (LDH) and creatine kinase (CK). The myocardium was also assessed for total superoxide dismutase (SOD) activity and malondialdehyde (MDA) content. The phosphorylation of p38 mitogen‑activated protein kinase (MAPK) was analyzed by western blotting. The present study reported for the first time, to the best of our knowledge, that I/R significantly increased infarct size, induced CK and LDH release, inhibited the activity of SOD and increased the levels of MDA, all of which were prevented by treatment with Api. In addition, I/R increased the phosphorylation of p38 MAPK, which was significantly decreased in the Api‑treated heart tissue samples following I/R, compared with the untreated heart tissue samples. In conclusion, the results of the present study demonstrated that Api inhibited the p38 MAPK signaling pathway to protect cardiomyocytes from I/R‑induced injury.