Myocardial dysfunction is a serious consequence of sepsis and contributes to high mortality. Currently, the molecular mechanism of myocardial dysfunction induced by sepsis remains unclear. In the present study, we investigated the role of gasdermin D (GSDMD) in cardiac dysfunction in septic mice and the underlying mechanism. C57BL/6 wild-type (WT) mice and age-matched Gsdmd-knockout (Gsdmd -/-) mice were intraperitoneally injected with lipopolysaccharide (LPS) (10 mg/kg) to mimic sepsis. The results showed that GSDMD-NT, the functional fragment of GSDMD, was upregulated in the heart tissue of septic WT mice induced by LPS, which was accompanied by decreased cardiac function and myocardial injury, as shown by decreased ejection fraction (EF) and fractional shortening (FS) and increased cardiac troponin I (cTnI), creatine kinase isoenzymes MB (CK-MB), and lactate dehydrogenase (LDH). Gsdmd -/- mice exhibited protection against LPS-induced myocardial dysfunction and had a higher survival rate. Gsdmd deficiency attenuated LPS-induced myocardial injury and cell death. Gsdmd deficiency prevented LPS-induced the increase of interleukin-1β (IL-1β) and tumor necrosis factor-α (TNF-α) in serum, as well as IL-1β and TNF-α mRNA levels in myocardium. In addition, LPS-mediated inflammatory cell infiltration into the myocardium was ameliorated and activation of NF-κB signaling pathway and the NOD-like receptor protein 3 (NLPR3) inflammasome were suppressed in Gsdmd -/- mice. Further research showed that in the myocardium of LPS-induced septic mice, GSDMD-NT enrichment in mitochondria led to mitochondrial dysfunction and reactive oxygen species (ROS) overproduction, which further regulated the activation of the NLRP3 inflammasome. In summary, our data suggest that GSDMD plays a vital role in the pathophysiology of LPS-induced myocardial dysfunction and may be a crucial target for the prevention and treatment of sepsis-induced myocardial dysfunction.