ImportanceGenetic and lifestyle factors are related to thyroid cancer (TC). Whether a healthy lifestyle is associated with TC and could attenuate the influence of genetic variants in TC remains equivocal.ObjectivesTo examine the associations between genetics and healthy lifestyle with incident TC and whether adherence to a healthy lifestyle modifies the association between genetic variants and TC.Design, Setting, and ParticipantsA prospective cohort study using UK Biobank data recruited 502 505 participants aged 40 to 69 years between March 13, 2006, and October 1, 2010. A total of 307 803 participants of European descent were recruited at baseline, and 264 956 participants were available for the present study. Data analysis was conducted from November 1, 2021, to April 22, 2022.ExposuresLifestyle behaviors were determined by diet index, physical activity, weight, smoking, and alcohol consumption. Lifestyle was categorized as unfavorable (scores 0-1), intermediate (score 2), and favorable (scores 3-5). The polygenic risk score (PRS) was derived from a meta–genome-wide association study using 3 cohorts and categorized as low, intermediate, and high.Main Outcomes and MeasuresThyroid cancer was defined using the International Classification of Diseases, Ninth Revision (code 193), International Statistical Classification of Diseases and Related Health Problems, Tenth Revision (code C73), and self-report (code 1065).ResultsOf 264 956 participants, 137 665 were women (52%). The median age was 57 (IQR, 49-62) years. During a median follow-up of 11.1 (IQR, 10.33-11.75) years (2 885 046 person-years), 423 incident TCs were ascertained (14.66 per 100 000 person-years). Higher PRSs were associated with TC (hazard ratio [HR], 2.25; 95% CI, 1.91-2.64; P = 8.65 × 10−23). An unfavorable lifestyle was also associated with a higher risk of TC (HR, 1.93; 95% CI, 1.50-2.49; P < .001). When stratified by PRS, unfavorable lifestyle was associated with TC in the higher PRS group (favorable vs unfavorable HR, 0.52; 95% CI, 0.37-0.73; P < .001). Furthermore, participants with both a high PRS and unfavorable lifestyle had the highest risk of TC (HR, 4.89; 95% CI, 3.03-7.91; P < .001).Conclusions and RelevanceIn this prospective cohort study, genetic and lifestyle factors were independently associated with incident TC, which suggests that a healthier lifestyle may attenuate the deleterious influence of genetics on the risk of TC in individuals of European descent.