OBJECTIVE To assess the association between use of sodium–glucose cotransporter 2 (SGLT2) inhibitors and the risk of new-onset atrial fibrillation (AF) in routine clinical practice. RESEARCH DESIGN AND METHODS We used nationwide registers in Denmark, Norway, and Sweden from 2013 to 2018 in order to include patients without a history of AF who were newly prescribed an SGLT2 inhibitor or an active comparator (glucagon-like peptide 1 [GLP-1] receptor agonist). We performed a cohort study to assess new-onset AF in intention-to-treat analyses using Cox regression, adjusted for baseline covariates with propensity score weighting. RESULTS We identified 79,343 new users of SGLT2 inhibitors (59.2% dapagliflozin, 40.0% empagliflozin, 0.8% canagliflozin, CONCLUSIONS In this cohort study using nationwide data from three countries, use of SGLT2 inhibitors, compared with GLP-1 receptor agonists, was associated with a modestly reduced risk of new-onset AF.