Aims: We aimed to examine efficacy and safety outcomes of sodium-glucose cotransporter-2 inhibitor (SGLT2i) for the treatment of heart failure (HF), especially in patients with heart failure with preserved ejection fraction (HFpEF). Methods and results: PubMed, Web of Science, and Cochrane Library were searched to identify randomized controlled trials comparing SGLT2i vs. placebo in HF patients. A total of 10 studies with 23 852 HF patients were eventually included. Compared with placebo, SGLT2i is associated with a lower incidence of composite of first hospitalization for heart failure (HHF) or cardiovascular death (CV death) [hazard ratio (HR) = 0.76 95% confidence interval (CI) = 0.71–0.81], which is consistent regardless of the diabetes status, type of gliflozines used, and follow-up duration. SGLT2i can reduce the risk of total HHF or CV death (HR = 0.74, 95%CI = 0.68–0.81), first HHF (HR = 0.69, 95%CI = 0.64–0.75), CV death (HR = 0.88, 95%CI = 0.80–0.96), any death (HR = 0.90, 95%CI = 0.83–0.97), and any serious events (HR = 0.90, 95%CI = 0.87–0.93) in HF patients, at the cost of increased risk of urinary tract infections (risk ratio = 1.17, 95%CI = 1.03–1.33). In HFpEF patients, SGLT2i is associated with a significant reduction of composite of first HHF or CV death (HR = 0.81, 95%CI = 0.73–0.91), first HHF (HR = 0.71, 95%CI = 0.62–0.82), and total HHF or CV death (HR = 0.61, 95%CI = 0.43–0.86). Conclusions: Sodium-glucose cotransporter-2 inhibitor contributed to better efficacy outcomes in overall HF patients and showed an inspiring breakthrough in the treatment of HFpEF.