Background: Studies have demonstrated that db/db mice have increased susceptibility to myocardial ischemia-reperfusion (IR) injury and ventricular tachyarrhythmias (VA). We aimed to investigate the antiarrhythmic and molecular mechanisms of ranolazine in db/db mouse hearts with acute IR injury.Methods: Ranolazine was administered for 1 week before coronary artery ligation. Diabetic db/db and control db/+ mice were divided into ranolazine-given and -nongiven groups. IR model was created by 15-min left coronary artery ligation and 10-min reperfusion. In vivo electrophysiological studies and optical mapping to simultaneously record intracellular Ca2+ (Cai) and membrane voltage in Langendorff-perfused hearts were performed. Western blotting and whole-cell patch clamp study were performed to evaluate the effect of ranolazine in the non-IR and IR zones. Results: The severity of VA inducibility by burst pacing was higher in db/db mice than db/+ mice with acute IR injury. Ranolazine suppressed VA inducibility and severity in db/db and db/+ mice. Optical mapping studies showed that ranolazine significantly shortened action potential duration (APD80), Cai transient duration (CaiTD80), Cai decay time, ameliorated conduction inhomogeneity, and suppressed arrhythmogenic alternans induction. The expression of pThr17-phospholamban, calsequestrin 2 and SCN5A in the IR zone was significantly downregulated in db/db mice, which was ameliorated by ranolazine. Conclusions: Ranolazine pretreatment shortens APD80 and CaiTD80, reduces Cai decay time, and ameliorates conduction velocity inhomogeneity to suppress induction of arrhythmogenic alternans and VA; and amelioration of downregulation of pThr17-phospholamban, calsequestrin 2 and SCN5A may partly underlie the anti-arrhythmic molecular mechanisms of ranolazine in db/db mouse hearts with IR injury.