The aim of the present study was to explore whether hydrogen sulfide (H2S) protects against ischemic heart failure (HF) by inhibiting the necroptosis pathway. Mice were randomized into Sham, myocardial infarction (MI), MI + propargylglycine (PAG) and MI + sodium hydrosulfide (NaHS) group, respectively. The MI model was induced by ligating the left anterior descending coronary artery. PAG was intraperitoneally administered at a dose of 50 mg/kg/day for 4 weeks, and NaHS at a dose of 4mg/kg/day for the same period. At 4 weeks after MI, the following were observed: A significant decrease in the cardiac function, as evidenced by a decline in ejection fraction (EF) and fractional shortening (FS), an increase in plasma myocardial injury markers, such as creatine kinase-MB (CK-MB) and cardiac troponin I (cTNI), an increase in myocardial collagen content in the heart tissues, and a decrease of H2S level in plasma and heart tissues. Furthermore, the expression levels of necroptosis-related markers such as receptor interacting protein kinase 1 (RIP1), RIP3 and mixed lineage kinase domain-like protein (MLKL) were upregulated after MI. NaHS treatment increased H2S levels in plasma and heart tissues, preserving the cardiac function by increasing EF and FS, decreasing plasma CK-MB and cTNI and reducing collagen content. Additionally, NaHS treatment significantly downregulated the RIP1/RIP3/MLKL pathway. While, PAG treatment aggravated cardiac function by activated the RIP1/RIP3/MLKL pathway. Overall, the present study concluded that H2S protected against ischemic HF by inhibiting RIP1/RIP3/MLKL-mediated necroptosis which could be a potential target treatment for ischemic HF.