Diabetes mellitus (DM) is associated with an increased risk of complications in atrial fibrillation (AF). This study aimed to assess the incidence and risks of ischemic stroke and mortality according to baseline HbA1c levels in patients with DM and AF. We conducted a cohort study using Clalit Health Services electronic medical records. The study population included all Clalit Health Services members aged ≥25 years, with the first diagnosis of AF between January 1, 2010, and December 31, 2016, who had a diagnosis of DM. The risk of stroke and all-cause death were compared according to HbA1c levels at the time of AF diagnosis:7.0%, between 7% and 9%, and ≥9%. A total of 44,451 patients with DM and AF were identified. The median age was 75 years (interquartile 65 to 83), and 52.5% were women. During a mean follow-up of 38 months, higher levels of HbA1c were associated with an increased risk of stroke with a dose-dependent response when compared with patients with HbA1c7% (Adjusted hazard ratio [aHR] =1.30 [95% confidence interval 1.10 to 2.05] for levels between 7% and 9% and 1.60 (95% confidence interval 1.25 to 2.03) for HbA1c9%, even after adjusting for CHA