Observational studies suggested increased risks of Alzheimer's disease (AD), Parkinson's disease (PD), and multiple sclerosis (MS) in patients with Crohn's disease (CD) and ulcerative colitis (UC). We aimed to assess the causality for the associations of CD and UC with the risks of AD, PD, and MS through a two-sample Mendelian randomization (MR) study. Independent single nucleotide polymorphisms associated with CD (17,897 cases and 33,977 controls) and UC (13,768 cases and 33,977 controls) were identified as genetic instruments based on a European-descent genome-wide association study (GWAS) released by the International Inflammatory Bowel Disease Genetics Consortium. Summary statistics for AD (combined: 25,881 cases and 256,837 controls), PD (combined: 35,836 cases and 665,686 controls), and MS (combined: 48,477 cases and 285,515 controls) were obtained from the largest GWASs and FinnGen study of European ancestry, respectively. MR estimates were generated using the inverse-variance weighted method in the main analysis with a series of sensitivity analyses. MR analyses were conducted per outcome database and were subsequently meta-analyzed to generate combined estimates. Genetically predicted UC was significantly associated with increased risks of AD (combined: OR, 1.03; 95% CI, 1.01-1.05; P = 1.80 × 10-3) and MS (combined: OR, 1.37; 95% CI, 1.23-1.53; P = 1.18 × 10-8), while there was no association between genetically predicted UC and the risk of PD. In contrast, no significant associations were observed for genetically predicted CD with AD, PD, and MS. MR-Egger regression showed no directional pleiotropy for the identified associations, and sensitivity analyses with different MR methods further confirmed these findings. This study suggested significant adverse effects of UC on AD and MS, highlighting that UC patients should receive early intervention with optimal adjunctive medical therapy to reduce the risks of AD and MS.