Inflammation plays a crucial part in hyperglycemia-induced myocardial damage. Hydrogen sulfide has been found to possess multiple biological activities in previous studies. This study investigated whether hydrogen sulfide conferred cardiac protection against damage in a diabetic rat model by inhibiting nucleotide-binding oligomerization domain-like receptor protein (NLRP) 3 inflammasome activation. Male animals were assigned to control, streptozotocin, streptozotocin + sodium hydrosulfide, and streptozotocin + DL-propargylglycine groups. Animals in the three streptozotocin groups were administrated 55 mg/kg streptozotocin by intraperitoneal injection. Streptozotocin + sodium hydrosulfide and streptozotocin + propargylglycine groups were treated with sodium hydrosulfide (56 μmol/kg) and propargylglycine (40 mg/kg), respectively, for four weeks. Estimation of fasting blood glucose, heart-weight/body-weight, cardiac function, and histopathological analysis, and measurement of myocardial enzymes were done to evaluate the degree of cardiac injury. In order to investigate the redox changes, the levels of total antioxidant capacity, malondialdehyde and lipid peroxidation, and the activities of superoxide dismutase, catalase, and glutathione peroxidase were assessed; the protein expression levels of Thioredoxin and Thioredoxin-interacting protein were measured in myocardial tissue. In addition, inflammatory reactions were assessed by measuring the concentration levels of interleukin-6, tumor necrosis factor-α, interleukin-1β, and interleukin-18 in serum and the expression levels of NLRP3 inflammasome complex-associated proteins in cardiac tissue. In the heart, hyperglycemia significantly induced cardiac dysfunction and injury, redox perturbation, and aggravation of inflammatory reactions. However, except for fasting blood glucose, treatment with sodium hydrosulfide significantly ameliorated these alterations, whereas treatment with propargylglycine further aggravated these alterations. This study highlights the protective properties of hydrogen sulfide against hyperglycemia-induced cardiac injury, and its possible mechanism was shown to involve negative regulation of Thioredoxin-interacting protein-mediated NLRP3 inflammasome activation. Impact statement Diabetic cardiomyopathy is a serious complication of diabetic patients, accompanied by chronic inflammation. The nucleotide-binding oligomerization domain-like receptor protein (NLRP) 3 inflammasome complex is involved in the progression of the inflammatory response of diabetes, including diabetic cardiomyopathy. Hydrogen sulfide (H2S) is a novel endogenous gas messenger. Several pieces of evidence have exhibited that H2S exerts anti-oxidant and anti-inflammatory activities against hyperglycemia-induced myocardial injury, but the mechanism remains unclear. The current study indicated that H2S protected the myocardium against hyperglycemia-induced injury by preventing Thioredoxin-interacting protein (TXNIP)-mediated NLRP3 inflammasome complex activation. The inhibition of TXNIP-mediated NLRP3 inflammasome complex would be an efficient therapy for H2S treatment in diabetic cardiomyocytes.