Sodium-glucose cotransporter-2 inhibitors (SGLT-2 inhibitors) are new glucose-lowering drugs (GLDs) with demonstrated cardiovascular benefits in patients with heart disease and type-2 diabetes mellitus (T2DM). However, their safety and efficacy when prescribed at hospital discharge are unexplored. This prospective, observational, longitudinal cohort study included 104 consecutive T2DM patients discharged from the cardiology department between April 2018 and February 2019. Patients were classified based on SGLT-2 inhibitor prescription and adjusted by propensity-score matching. The safety outcomes included discontinuation of GLDs; worsening renal function; and renal, hepatic, or metabolic hospitalization. The efficacy outcomes were death from any cause, cardiovascular death, cardiovascular readmission, and combined clinical outcome (cardiovascular death or readmission). The results showed that, the incidence rates of safety outcomes were similar in the SGLT-2 inhibitor or non-SGLT-2 inhibitor groups. Regarding efficacy, the SGLT-2 inhibitors group resulted in a lower rate of combined clinical outcomes (18% vs. 42%; hazard ratio (HR), 0.35; p = 0.02), any cause death (0% vs. 24%; HR, 0.79; p = 0.001) and cardiovascular death (0% vs. 17%; HR, 0.83; p = 0.005). No significant differences were found in cardiovascular readmissions. SGLT-2 inhibitor prescription at hospital discharge in patients with heart disease and T2DM was safe, well tolerated, and associated with a reduction in all-cause and cardiovascular deaths.