Background: High bile acid concentration is associated with adverse perinatal outcomes (i.e., stillbirth and preterm birth) and experimental studies indicate that thyroid hormone regulates bile acid metabolism, but this has not yet been translated to clinical data in pregnant women. We aim to explore the association of thyroid function with bile acid concentrations and the risk of gestational hypercholanemia. Methods: This study comprised 68,016 singleton pregnancies without known thyroid or hepatobiliary diseases before pregnancy and thyroid medication based on a prospective cohort. Thyroid function and serum total bile acid (TBA) were routinely screened in both early (9-13 weeks) and late pregnancy (32-36 weeks). Hypercholanemia was defined as serum TBA concentration ≥10 μmol/L. Multiple linear regression models and multiple logistic regression models were performed. Results: A higher free thyroxine (fT4) during both early or late pregnancy was associated with a higher TBA concentration and a higher risk of hypercholanemia (all p < 0.01). A higher thyrotropin (TSH) in early pregnancy was associated with a higher TBA concentration in early pregnancy (p = 0.0155), but with a lower TBA concentration during later pregnancy (p < 0.0001), and there was no association of TSH with hypercholanemia. Overt hyperthyroidism in late pregnancy was associated with a 2.12-fold higher risk of hypercholanemia ([confidence interval; CI 1.12-4.03], p = 0.021) and subclinical hyperthyroidism during later pregnancy was associated with a 1.5-fold higher risk of hypercholanemia ([CI 1.14-1.97], p = 0.0034). Sensitivity analyses indicated that a high fT4 throughout pregnancy was associated with a higher risk of hypercholanemia rather than only in early or late pregnancy. Conclusions: A higher fT4 concentration during either early or late pregnancy, but not the TSH concentration, is associated with higher TBA and a higher risk of gestational hypercholanemia. Furthermore, hyperthyroidism during pregnancy could be a novel risk factor for hypercholanemia.