Observational studies have suggested a link between severe mental illness (SMI) and risk of lung carcinoma (LC); however, causality has not been established. In this study, we conducted a two-sample, two-step Mendelian randomization (MR) investigation to uncover the etiological influence of SMI on LC risk and quantify the mediating effects of known modifiable risk factors. We obtained summary-level datasets for schizophrenia, major depressive disorder (MDD), and bipolar disorder (BD) from the Psychiatric Genomics Consortium (PGC). Data on single nucleotide polymorphisms (SNPs) associated with lung carcinoma (LC) were sourced from a recent large meta-analysis by McKay et al. We employed two-sample MR and two-step MR utilizing the inverse variance weighted method for causal estimation. Sensitivity tests were conducted to validate causal relationships. In two-sample MR, we identified schizophrenia as a risk factor for LC (OR = 1.06, 95% CI 1.02–1.11, P = 3.48E-03), while MDD (OR = 1.18, 95% CI 0.98–1.42, P = .07) and BD (OR = 1.07, 95% CI 0.99–1.15, P = .09) showed no significant association with LC. In the two-step MR, smoking accounted for 24.66% of the schizophrenia-LC risk association, and alcohol consumption explained 7.59% of the effect. Schizophrenia is a risk factor for lung carcinoma, and smoking and alcohol consumption are the mediating factors in this causal relationship. LC screening should be emphasized in individuals with schizophrenia, particularly in those who smoke and consume alcohol regularly.