ImportanceSodium-glucose cotransporter-2 inhibitors (SGLT-2is) have demonstrated many cardiovascular and kidney function benefits for patients with type 2 diabetes (T2D). However, the results of SGLT-2i use in primary prevention of atrial fibrillation (AF) were inconsistent in clinical trials, and incident AF was not a prespecified end point.ObjectiveTo examine incident AF with initiation of an SGLT-2i compared with initiation of a dipeptidyl peptidase-4 inhibitor (DPP-4i) or a glucagonlike peptide-1 receptor agonist (GLP-1RA) among older adults (aged ≥66 years) with T2D in routine clinical practice.Design, Setting, and ParticipantsA population-based new-user cohort study included older adults with T2D who had no history of AF and were enrolled in Medicare fee-for-service from April 1, 2013, to December 31, 2018. Data analysis was performed from June 28 to December 1, 2021.ExposuresTo control for potential confounding, new users of SGLT-2i were 1:1 propensity score (PS)–matched to new users of DPP-4is or GLP-1RAs in 2 pairwise comparisons based on 138 baseline covariates.Main Outcomes and MeasuresThe primary outcome was incident AF, defined as an inpatient diagnosis code for AF. Hazard ratios (HRs) and rate differences (RDs) per 1000 person-years, with their 95% CIs, were estimated in the PS-matched groups.ResultsNew users of SGLT-2is were 1:1 PS-matched to new users of a DPP-4i (n = 74 868) or GLP-1RA (n = 80 475). Overall, the mean (SD) age of study participants was 72 (5) years, and 165 984 were women (53.4%). The risk of incident AF was lower in the SGLT-2i group than the matched DPP-4i group (HR, 0.82; 95% CI, 0.76 to 0.89; RD, –3.7; 95% CI, –5.2 to –2.2 per 1000 person-years) or the matched GLP-1RA group (HR, 0.90; 95% CI, 0.83 to 0.98; RD, –1.8; 95% CI, –3.2 to –0.3 per 1000 person-years). Results were consistent across several sensitivity and subgroup analyses.Conclusions and RelevanceThe findings of this study suggest that the initiation of an SGLT-2i was associated with a reduced risk of incident AF compared with a DPP-4i or GLP-1RA. The results may be helpful when weighing the potential risks and benefits of various glucose level–lowering agents in older adults with T2D.