Metformin and sodium-glucose cotransporter-2 (SGLT2) inhibitors have demonstrated cardiovascular benefits but their comparative effects on mortality in type 2 diabetes mellitus (T2DM) patients with cardiovascular disease (CVD) are unknown. Hence, we evaluated and compared lifetime benefits arising from metformin or SGLT2 inhibitors in T2DM patients with CVD. Studies published in the PubMed, EMBASE and CENTRAL databases before 28 October 2023 were retrieved. Treatment effects of metformin against US FDA-approved SGLT2 inhibitors in T2DM patients with CVD were evaluated and lifetime gains in event-free survival were estimated from our primary endpoints of all-cause and cardiovascular mortality. Risk ratios were derived to assess their impact on secondary outcomes such as major adverse cardiovascular events and hospitalizations for heart failure. Overall, 14 studies were included. Five studies published Kaplan-Meier curves for the primary outcome of all-cause mortality. Individual participant data were reconstructed from these Kaplan-Meier curves, from which we conducted our two-stage meta-analysis. Participants receiving metformin and SGLT2 inhibitors experienced a reduction in the risk for all-cause mortality as compared with those not taking metformin and placebo. However, participants receiving SGLT2 inhibitors had a higher all-cause mortality (hazard ratio 1.308, 95% confidence interval 1.103-1.550) versus metformin. Treatment with metformin was estimated to offer an additional 23.26months of survival free from all-cause mortality versus 23.04months with SGLT2 inhibitors. In patients with T2DM and CVD, metformin and SGLT2 inhibitors were associated with substantially lower all-cause mortality rates and slightly longer life expectancies than in patients without. Metformin presented an advantage over SGLT2 inhibitors in reducing all-cause mortality.