Dilated cardiomyopathy (DCM) is the major cause of heart failure and has a poor prognosis. The accumulating evidence points to an essential role of the inflammatory component in the process of DCM. Inhibitors of sodium-glucose cotransporter 2 (SGLT2) are widely used to treat heart failure patients due to their cardiac benefits. However, their role in DCM remains unclear. We used the doxorubicin (Dox)-induced DCM model for our study. The SGLT2 inhibitor dapagliflozin (Dapa) improved cardiac function in mice treated with doxorubicin and attenuated the activation of the nucleotide-binding oligomerization domain-like receptor family protein 3 (NLRP3) inflammasome pathway and the expression of inflammatory factors. In addition, dapagliflozin suppresses NLRP3 activation by decreasing p38-dependent toll-like receptor 4 (TLR4) expression. In our study, dagliflozin improves cardiac function in DCM by inhibiting the activity of the NLRP3 inflammasome.Graphical Abstract