ABSTRACT: This study aimed to evaluate the association between thyroid dysfunction and breast cancer risk. We included 239,436 females of the UK Biobank cohort. Information on thyroid dysfunction, personal and family medical history, medications, reproductive factors, lifestyle, and socioeconomic characteristics was retrieved from baseline self-reported data and hospital inpatient databases. Breast cancer diagnoses were identified through population-based registries. We computed Cox models to estimate hazard ratios (HRs) of breast cancer incidence for thyroid dysfunction diagnosis and treatments, and examined potential confounding and effect modification by comorbidities and breast cancer risk factors. In our study, 3,227 (1.3%) and 20,762 (8.7%) women had hyper- and hypothyroidism prior to the baseline. During a median follow-up of 7.1 years, 5,326 (2.2%) women developed breast cancer. Compared to no thyroid dysfunction, there was no association between hypothyroidism and breast cancer risk overall (HR = 0.93, 95% confidence interval (CI): 0.84-1.02, 442 cases), but we found a decreased risk more than 10 years after hypothyroidism diagnosis (HR=0.85, 95%CI 0.74-0.97, 226 cases). There was no association with hyperthyroidism overall (HR=1.08, 95%CI 0.86-1.35, 79 cases) but breast cancer risk was elevated among women with treated hyperthyroidism (HR=1.38, 95%CI: 1.03-1.86, 44 cases) or aged 60 years or more at hyperthyroidism diagnosis (HR=1.74, 95%CI: 1.01-3.00, 113 cases), and 5-10 years after hyperthyroidism diagnosis (HR=1.58, 95%CI: 1.06-2.33, 25 cases). In conclusion, breast cancer risk was reduced long after hypothyroidism diagnosis, but increased among women with treated hyperthyroidism. Future studies are needed to determine whether the higher breast cancer risk observed among treated hyperthyroidism could be explained by hyperthyroidism severity, type of treatment or aetiology.