Maintaining normal thyroid function is crucial in pregnancy, yet thyroid dysfunction and the presence of thyroid peroxidase antibodies (TPOAb) affect 0.5% to 18% of pregnant women. Here, we conducted a genome-wide association study (GWAS) of eight thyroid traits, including two thyroid-related hormones, four thyroid dysfunctions, and two thyroid autoimmunity measurements among 85,421 Chinese pregnant women to investigate the genetic basis of thyroid function during pregnancy. Our study identified 176 genetic loci, including 125 previously unknown genome-wide associations. Joint epidemiological and Mendelian randomization analyses revealed significant associations between the gestational thyroid phenotypes and gestational complications, birth outcomes, and later-age health outcomes. Specifically, genetically elevated thyroid-stimulating hormone (TSH) levels during pregnancy correlated with lower glycemic levels, reduced blood pressure, and longer gestational duration. Additionally, TPOAb and thyroid functions during pregnancy share genetic correlations with later-age thyroid and cardiac disorders. These findings provide novel insights into the genetic determinants of thyroid traits during pregnancy, which may lead to new therapeutics, early pre-diagnosis and preventive strategies starting from early adulthood.