Observational studies have indicated that inflammatory bowel disease (IBD) patients have higher incidence of skin carcinoma (SC), including melanoma skin carcinoma (MSC) and nonmelanoma skin carcinoma (NMSC) than healthy people. However, whether there is a causal relationship between the 2 is unclear. The purpose of this study was to evaluate the causality of IBD on SC using the Mendelian randomization (MR) analysis. We performed a two-sample MR analysis using publicly available genome-wide association study data. Eligible instrumental variables were selected based on the 3 core assumptions of MR analysis. The inverse-variance weighted (IVW) approach served as the primary analytical method. Supplementary analyses were conducted using MR-Egger regression, the weighted median, the weighted mode, and MR pleiotropy residual sum and outlier methods. Genetically predicted IBD (IVW odds ratio [OR] = 1.07, 95% confidence interval [CI]: 1.02-1.13, P = .011) and ulcerative colitis (UC; IVW OR = 1.09, 95% CI: 1.03-1.16, P = .003) were associated with an increased risk of MSC. Results of complementary methods were consistent with those of the IVW method with the exception of the weighted mode. In addition, Crohn disease (CD; IVW OR = 1.04, 95% CI: 0.99-1.08, P = .128) did not have a causal effect on MSC. Moreover, IBD (IVW OR = 1.03, 95% CI: 1.00-1.07, P = .034) and CD (IVW OR = 1.03, 95% CI: 1.00-1.06, P = .045) were associated with an increased risk of NMSC. However, UC (IVW OR = 1.00, 95% CI: 0.97-1.04, P = .803) was not significantly associated with an increased risk of NMSC. Our study revealed genetically predicted associations between IBD and the risks of MSC and NMSC in European populations. Furthermore, UC was associated with an increased risk of MSC, while CD was associated with a higher risk of NMSC. However, the potential influence of immunosuppressive agents or biologics cannot be excluded.