Our study demonstrates that TNFSF14 is positively associated with the risk of thyroid cancer, and this association can be mediated by the levels of Lactosyl-N-palmitoyl-sphingosine (d18:1/16:0) and X-12013 in the blood, with mediation proportions of 8.55% and 5.78%, respectively. Here, TNFSF14 is linked to thyroid cancer.