Diabetic patients with cardiomyopathy show a higher incidence of arrhythmias and sudden death. Chronic hyperglycemia induces the formation of advanced glycation end products (AGEs), which contribute to the pathogenesis of diabetic cardiomyopathy. This study investigated whether inhibition of AGEs formation by aminoguanidine (AG) could prevent cardiac electromechanical and arrhythmogenic remodeling in diabetes mellitus. Streptozotocin-induced diabetic rats received AG (100 mg/kg daily, i.p.) or vehicle (normal saline, i.p.) for 5 weeks. The rats underwent hemodynamic recording to evaluate cardiac function, and heart preparations were used to determine the electrical, mechanical, and biochemical functions. In vitro high glucose-induced AGEs formation, reactive oxygen species (ROS) generation, and action potential changes were examined in HL-1 atrial cells. AG treatment improved the diabetes-induced depression in left ventricular pressure and the relaxation rate, and normalized the prolongation of QTc intervals in anesthetized rats. AG reduced the vulnerabilities to atrial and ventricular tachyarrhythmias in perfused diabetic hearts. AG normalized the prolonged action potential duration in diabetic atrial and ventricular muscles, which was correlated with the restoration of both transient outward (Ito) and steady-state outward (ISS) K+ current densities in cardiomyocytes. The abnormal kinetics of Ca2+ transients and contraction were reversed in cardiomyocytes from AG-treated diabetic rats, along with parallel preservation of sarco(endo)plasmic reticulum Ca2+-ATPase (SERCA2a) expression. Furthermore, ex vivo and in vitro studies showed AG attenuated AGEs and ROS formation. Thus, long-term administration of AG ameliorated cardiac electromechanical remodeling and arrhythmogenicity in diabetic rats and may present an effective strategy for the prevention of diabetes-associated arrhythmias.