Objective Levothyroxine treatment is common among older adults as is atrial fibrillation (AF), yet less is known about its potential effects on the development of dementia. Methods The study population included all adults with diagnosed AF (n = 156,104) aged ≥ 45 years in Sweden without an earlier recorded diagnosis of dementia. Individuals with a dispensed prescription of levothyroxine on two or more occasions between July 1 2005 and December 31 2006 in Sweden were considered exposed (n = 12,978; 8.3%), and were compared to all other patients with AF without this treatment. Cox regression with hazard ratios (HRs) and 95% confidence interval (95% CI), with outcome defined as dementia of all causes between January 1, 2007 and December 31, 2015, was used in the analysis. Adjustments were made for socio-demographic factors (age, immigration status, marital status, educational level, neighborhood socioeconomic status), co-morbidity (cardiovascular disease, obesity, diabetes, COPD, depression, anxiety and alcohol related diagnoses), and cardiovascular medications. Results During follow-up, a total of 9054 patients with AF were diagnosed with dementia (5.8%). We found no significant association of levothyroxine treatment and incident dementia, fully adjusted HR 1.03 (95% CI 0.96-1.11), neither among men and women, nor in different age-groups or subgroups of dementia. Conclusion We found no significant association of levothyroxine treatment and incident dementia among patients with AF, which contrasts some earlier findings.