•Long-term SGLT2 inhibition with dietary canagliflozinin diabetic and nondiabetic rats attenuates myocardial ischemia/reperfusion injury ex vivo. Here, SLC5A2 is linked to myocardial ischemia.