Ca
2+
/calmodulin-dependent protein kinase II (CaMKII) hyperactivity causes cardiac arrhythmias, a major source of morbidity and mortality worldwide. Despite proven benefits of CaMKII inhibition in numerous preclinical models of heart disease, translation of CaMKII antagonists into humans has been stymied by low potency, toxicity, and an enduring concern for adverse effects on cognition due to an established role of CaMKII in learning and memory. To address these challenges, we asked whether any clinically approved drugs, developed for other purposes, were potent CaMKII inhibitors. For this, we engineered an improved fluorescent reporter, CaMKAR (CaMKII activity reporter), which features superior sensitivity, kinetics, and tractability for high-throughput screening. Using this tool, we carried out a drug repurposing screen (4475 compounds in clinical use) in human cells expressing constitutively active CaMKII. This yielded five previously unrecognized CaMKII inhibitors with clinically relevant potency: ruxolitinib, baricitinib, silmitasertib, crenolanib, and abemaciclib. We found that ruxolitinib, an orally bioavailable and U.S. Food and Drug Administration–approved medication, inhibited CaMKII in cultured cardiomyocytes and in mice. Ruxolitinib abolished arrhythmogenesis in mouse and patient-derived models of CaMKII-driven arrhythmias. A 10-min pretreatment in vivo was sufficient to prevent catecholaminergic polymorphic ventricular tachycardia, a congenital source of pediatric cardiac arrest, and rescue atrial fibrillation, the most common clinical arrhythmia. At cardioprotective doses, ruxolitinib-treated mice did not show any adverse effects in established cognitive assays. Our results support further clinical investigation of ruxolitinib as a potential treatment for cardiac indications.