Background: Atrial fibrillation (AF) has the close relation to thyroid dysfunction and these two diseases lead to poor cardiovascular outcomes. But the prognostic value of thyroid diseases in AF remains unclear. We aimed to determine whether history of thyroid diseases is associated with risk of in-hospital cardiovascular outcomes in AF., Methods: Based on the data from the CCC-AF (Improving Care for Cardiovascular Diseases in China-Atrial Fibrillation) project, 31,486 inpatients with a definitive diagnosis of AF and record of history of thyroid diseases were included. Logistic regression analysis was performed to investigate the relationship between history of thyroid diseases and risk of in-hospital major adverse cardiovascular events (MACE) in AF., Results: Among AF patients, 503 (1.6%) had a history of hypothyroidism, 642 (2.0%) had a history of hyperthyroidism and 30,341 (96.4%) had no thyroid dysfunction. During this hospitalization, 5146 (16.3%) AF patients suffered from MACE. The incidence was 13.1% in hypothyroidism, 16.3% in euthyroidism and 19.0% in hyperthyroidism, in which there was a significant difference among three groups (p=0.028). Multivariable logistic regression analysis revealed that history of hypothyroidism decreased but history of hyperthyroidism increased the risk of in-hospital MACE in AF patients (adjusted odds ratio [OR]=0.603; 95% confidence interval [CI], 0.449-0.811; p=0.001 versus adjusted OR=1.327; 95% CI, 1.060-1.661; p=0.013)., Conclusion: History of hypothyroidism was an independent protective factor, whereas history of hyperthyroidism was an independent risk factor for in-hospital cardiovascular outcomes in AF. Our study indicated that hyperthyroidism should be treated aggressively in order to improve the prognosis of AF., (Copyright © 2020 The Author(s). Published by Elsevier España, S.L.U. All rights reserved.)