Background: Type 2 diabetes mellitus (T2DM) and inflammatory bowel disease (IBD) have been associated, according to various epidemiological research. This study uses Mendelian randomization (MR) to investigate the causal link between T2DM and IBD.Methods: To investigate the causal relationship between IBD and T2DM risk using European population data from the genome-wide association study (GWAS) summary datasets, we constructed a two-sample MR study to evaluate the genetically predicted impacts of liability towards IBD outcomes on T2DM risk. As instrumental variables (IVs), we chose 26 single nucleotide polymorphisms (SNPs) associated with IBD exposure data. The European T2DM GWAS data was obtained from the IEU OpenGWAS Project database, which contains 298,957 cases as the outcome data. The causal relationship between T2DM and IBD using a reverse MR analysis was also performed.Results: The two-sample MR analysis, with the Bonferroni adjustment for multiple testing, revealed that T2DM risk in Europeans is unaffected by their IBD liability (odds ratio (OR): 0.950–1.066, 95% confidence interval (CI): 0.885–1.019, p = 0.152–0.926). The effects of liability to T2DM on IBD were not supported by the reverse MR analysis either (OR: 0.739–1.131, 95% confidence interval (CI): 0.651–1.100, p = 0.058–0.832). MR analysis of IBS on T2DM also have no significant causal relationship (OR: 0.003–1.007, 95% confidence interval (CI): 1.013–5.791, p = 0.069–0.790). FUMA precisely mapped 22 protein-coding genes utilizing significant SNPs of T2DM acquired from GWAS.Conclusion: The MR study showed that the existing evidence did not support the significant causal effect of IBD on T2DM, nor did it support the causal impact of T2DM on IBD.