Doxorubicin (DOX) is a potent and available antitumor therapeutic agent; however, its clinical application is limited due to its cardiotoxicity. Preliminary evidence suggests that hydrogen sulfide (H2S) may exert protective effects on DOX‑induced cardiotoxicity. Therefore, the aim of the present study was to investigate whether the extracellular signal‑regulated kinase (ERK) 1/2 signaling pathway is involved in the cardioprotection of H2S against DOX‑induced cardiotoxicity. The present study demonstrated that pretreatment with sodium hydrosulfide (NaHS; a donor of H2S) prior to DOX exposure attenuated the decreased cell viability, the increased apoptosis rate and the intracellular accumulation of reactive oxygen species (ROS) in H9c2 cardiac myocytes. Exposure of H9c2 cardiac myocytes to DOX upregulated the expression levels of phosphorylated ERK1/2, which had been reduced by pretreatment with NaHS or N‑acetyl‑L‑cysteine, a ROS scavenger. In addition, H2S upregulated the anti‑apoptotic protein, Bcl‑2 and downregulated the pro‑apoptotic protein, Bax. Notably, U0126, a selective inhibitor of ERK1/2, was observed to mimic the above‑mentioned cytoprotective activity of H2S. In conclusion, these findings indicate that H2S attenuates DOX‑induced cardiotoxicity by inhibiting ROS-mediated activation of ERK1/2 in H9c2 cardiac myocytes.