BACKGROUND: The coexistence of tuberculosis (TB) and lung cancer (LC) is not rare, but their causal association are underexplored. This study aims to elucidate these bidirectional correlations and investigate the mediating effects of immunophenotypes and plasma metabolites. METHODS: Genetic variants for TB and LC were sourced from the IEU Open GWAS Project, while data for 731 immunophenotypes and 1400 plasma metabolites from previously published GWAS. Our core methodology centered on inverse-variance weighted method, supplemented by MR-Egger, weighted median, simple mode, and weighted mode analyses to evaluate the bidirectional causal association between TB and LC. Additionally, a two-step Mendelian randomization analysis was performed to assess mediators of the association and calculate the mediated proportions. Multiple sensitivity analyses ensured the reliability of results. RESULTS: Inverse-variance weighted results indicated a positive causal association between TB and LC (odds ratio: 1.072, 95 % confidence interval: 1.010-1.137, P <
0.05), with no reverse relationship. Causal associations were found between 30 immunophenotypes and 106 metabolites with LC (all P <
0.05). Among these, 1 immunophenotype, 6 metabolite levels, and 1 metabolite ratio were potential mediators of the TB-LC association. Specifically, CD4 on CD39 CONCLUSION: TB is a risk factor for LC at a genetically predicted level, potentially mediated through immune cell and metabolite regulation.