Background: Both eczema and tumor are associated with immune disorders. Although several investigations have observed the relationship between eczema and certain cancers, evidence for causality is lacking.Methods: We conducted a two-sample Mendelian randomization(MR) study to examine and explore the genetic association between eczema and pan-cancers. Upon satisfying the three core assumptions of MR, we analyzed the causality between eczema and 15 sitespecific cancers utilizing an inverse variance weighted method. We verified the results through a series of sensitivity and reverse direction analyses. The exposure and outcome datasets were substituted from the Finn Gen and genome-wide association studies catalog databases. A meta-analysis on primary and validation analyses was performed to combine the estimates of MR study.Results: Based on the MR analysis results, eczema was associated with an increased risk of lung cancer(odds ratio [OR] = 1.0427, 95%confidence interval [CI] = 1.0082–1.0783, P = 0.0148) and brain cancer(OR = 1.0285, 95% CI = 1.0120–1.0452, P = 0.0007) and decreased risk of colorectal cancer(OR = 0.9324, 95% CI = 0.8774–0.9909, P = 0.0242) and malignant neoplasm of the kidney(OR = 0.9323, 95% CI = 0.8834–0.9839, P = 0.0108). The sensitivity analysis indicated that the results were stable and reliable, and the reverse MR analyses demonstrated no causation between the cancers of interest and eczema.Conclusions: Our results identified eczema as a genetic risk factor for lung and brain cancer and a protective factor for colorectal cancer and malignant neoplasm of the kidney. No connection was observed between eczema and other cancers. Further evidence from epidemiological and mechanistic studies is needed to elucidate these findings in detail.