ObjectiveTo investigate the relationship between function of thyroid, lipids, and cholelithiasis and to identify whether lipids mediate the causal relationship between function of thyroid and cholelithiasis.MethodsA Mendelian randomization (MR) study of two samples was performed to determine the association of thyroid function with cholelithiasis. A two-step MR was also performed to identify whether lipid metabolism traits mediate the effects of thyroid function on cholelithiasis. A method of inverse variance weighted (IVW), weighted median method, maximum likelihood, MR-Egger, MR-robust adjusted profile score (MR-RAPS) method, and MR pleiotropy residual sum and outlier test (MR-PRESSO) methods were utilized to obtain MR estimates.ResultsThe IVW method revealed that FT4 levels were correlated with an elevated risk of cholelithiasis (OR: 1.149, 95% CI: 1.082–1.283, P = 0.014). Apolipoprotein B (OR: 1.255, 95% CI: 1.027–1.535, P = 0.027) and low-density lipoprotein cholesterol (LDL-C) (OR: 1.354, 95% CI: 1.060–1.731, P = 0.016) were also correlated with an elevated risk of cholelithiasis. The IVW method demonstrated that FT4 levels were correlated with the elevated risk of apolipoprotein B (OR: 1.087, 95% CI: 1.019–1.159, P = 0.015) and LDL-C (OR: 1.084, 95% CI: 1.018–1.153, P = 0.012). Thyroid function and the risk of cholelithiasis are mediated by LDL-C and apolipoprotein B. LDL-C and apolipoprotein B had 17.4% and 13.5% of the mediatory effects, respectively.ConclusionsWe demonstrated that FT4, LDL-C, and apolipoprotein B had significant causal effects on cholelithiasis, with evidence that LDL-C and apolipoprotein B mediated the effects of FT4 on cholelithiasis risk. Patients with high FT4 levels should be given special attention because they may delay or limit the long-term impact on cholelithiasis risk.