Heart failure is one of the most common complications in patients with type 2 diabetes mellitus (T2DM) with, or at risk for, atherosclerotic cardiovascular disease (ASCVD). Clinical trials indicated that sodium-glucose co-transporter 2 inhibitors (SGLT2i) have demonstrated consistent reductions in hospitalization due to heart failure in this population. Emerging evidence also suggested that SGLT2i are beneficial to heart failure patients regardless of the presence of T2DM or not, and more evidence is accumulating. Although the inhibitors are well tolerated, clinical monitoring should be performed for serious adverse effects. This review summarizes the benefits, adverse effects, and proposed mechanisms of SGLT2i in prevention and treatment of heart failure.