ObjectivesThis cross-sectional study aimed to explore the association between methyl mercury (MeHg) level and latent tuberculosis infection (LTBI) risk based on the data from National Health and Nutrition Examination Survey (NHANES 2011–2012).MethodsA total of 5243 participants with 20 variables were enrolled. The importance of these variables on TB infection was first ranked by XGBoost and Random Forest methods. Then the association between MeHg level and infection risk was evaluated by restricted cubic spline, threshold effect, and generalized linear regression analyses. We also explored the factors correlated with the difference in MeHg level and finally conducted a mediation analysis to assess the mediating effect of MeHg in LTBI.Results521 participants were experiencing the LTBI, and 12 variables showed the differences between infection and non-infection groups (all P < 0.05). Of them, MeHg presented the highest importance on the LTBI. Restricted cubic spline (RCS) next revealed a significant non-linear correlation of MeHg with LTBI (all P < 0.05). Adjusted regression models further indicated their independent association (all P < 0.05), and infection risk increased with the increase of MeHg (P for trend < 0.05). We also found a significant turning point, and their association was significantly observed when MeHg > 5.75 µg/L (P < 0.05). In addition, asthma history was related to the difference in MeHg levels between LTBI and non-LTBI groups. Mediation analysis found that MeHg level partially mediated the association of asthma and LTBI risk (all P < 0.05).ConclusionsOur study identified MeHg as an independent risk factor for LTBI risk. Their causal relationship needs more investigation to verify.