Sodium‐glucose co‐transporter 2 inhibitors (SGLT2i) improve cardiovascular outcomes in patients with type 2 diabetes (T2D). Diabetic ketoacidosis (DKA) is an uncommon, but well recognised, life‐threatening complication of SGLT2i. In a retrospective study of patients with T2D undergoing cardiac surgery at our institution, DKA occurred in 15.3% of patients taking SGLT2i at the time of surgery, compared with 0.47% of non‐SGLT2i‐treated patients. Intravenous insulin in the first 24 h after surgery was associated with a significantly lower risk of DKA in SGLT2i patients. Use of an insulin infusion should be considered in these patients, especially in those who are unable to cease their SGLT2i pre‐operatively.