BackgroundPeriodontal disease can activate an immune process linked to systemic diseases, including atrial fibrillation. However, the relationship between periodontal disease and atrial fibrillation remains unclear.AimThis study aimed to investigate whether changes in periodontal disease status are associated with the risk of atrial fibrillation.MethodsUsing the National Health Insurance Database Korea, participants who underwent the first oral health examination in 2003 and a second examination in 2005–2006 without a history of atrial fibrillation were included. Participants were grouped according to changes in periodontal disease status during two oral examinations: periodontal disease-free, periodontal disease-recovered, periodontal disease-developed, and periodontal disease-chronic. The outcome was the incidence of atrial fibrillation.ResultsThe study included 1,254,515 participants, with a median follow-up of 14.3 years and 25,402 (2.02%) cases of atrial fibrillation occurred. During follow-up, the risk of atrial fibrillation was highest in the periodontal disease-chronic group, followed by the periodontal disease-developed, periodontal disease-recovered, and periodontal disease-free groups (p for trend < 0.001). Moreover, recovery from periodontal disease was associated with a reduced risk of atrial fibrillation compared to a chronic periodontal disease status (Hazard ratio: 0.97, 95% Confidence interval: 0.94—0.99,p= 0.045). The development of periodontal disease was associated with an increased risk of atrial fibrillation compared to being periodontal disease-free (Hazard ratio: 1.04, 95% Confidence interval: 1.01—1.08,p= 0.035).ConclusionOur findings suggest that changes in periodontal disease status impact the risk of atrial fibrillation. Management of periodontal disease may help prevent atrial fibrillation.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12903-023-03165-x.