Abstract Background Atrial fibrillation is the most common sustained cardiac arrhythmia and is prevalent among the elderly. Previous findings indicated a higher prevalence of AF in frail adults and frailty prevalent in AF patients. However, the association between dynamic changes of frailty and risk of new-onset AF is unclear. Purpose We aimed to investigate the associations of long-term changes in frailty with incident AF. Its associations with heart failure (HF), coronary heart disease (CHD), and stroke were also evaluated as a secondary aim. Methods Over 50,000 participants from UK Biobank cohort were included, with available frailty index (FI) data and free of AF, HF, CHD or stroke in both baseline and final follow-up assessments. Participants were categorized into nonfrailty, prefrailty and frailty based on their FI scores. Changes of frailty status from baseline to final follow-up assessment included alleviation, maintenance, and aggravation. Thus, transitions of frailty status included 7 categories: nonfrailty maintenance, nonfrailty aggravation (nonfrailty to prefrailty or frailty), prefrailty alleviation (prefrailty to nonfrailty), prefrailty maintenance, prefrailty aggravation (prefrailty to frailty), frailty alleviation (frailty to prefrailty or nonfrailty), and frailty maintenance. FI in baseline and follow-ups are used to calculate the trajectories of frailty (ΔFI). Cox proportional hazard models were used. Results Compared with nonfrailty at baseline, the HRs (95% CI) of AF for prefrailty and frailty were 1.32 (1.29, 1.36) and 1.89 (1.83, 1.96) in the multivariable-adjusted model. During a median of 5.1 years of follow-up from the final assessment, 1729 cases of AF were recorded. Frailty trajectory analysis showed that even a 0.01 point/year increase in ΔFI was associated with 14% (95% CI 1.08-1.20) higher risk of AF, independent of baseline FI and the risk rose to 1.89 (1.45, 2.46) with per 0.05 point/year increase in ΔFI. This association was strengthened in low genetic risk of AF, but sex, age, smoking status, alcohol intake, obesity, hypertension, diabetes and cancer did not materially modify the associations. Moreover, compared with nonfrailty maintenance, sustained frailty had the highest risk of AF (HR 1.95, 1.61-2.36). Alleviation from frailty reduced the risk of AF by 30% (95%CI 0.53-0.94), compared to sustained frailty. These associations were similar in HF and CHD, however, not significant in stroke. Conclusions Middle aged and elderly people, including those with diabetes, obesity and hypertension, may gain substantial benefits in risk of AF, HF and CHD by becoming less frail or maintaining nonfrailty, irrespective of past frailty status and established risk factors, delivering public health implications for the necessity of early identification and timely interventions of frailty in heart health management.