Objective To analyze the causal association of minerals and vitamins with inflammatory bowel disease (IBD) based on the Mendelian randomization (MR) method. Methods Data of Genome⁃Wide Association Study (GWAS) for various minerals and vitamins were obtained from the OpenGWAS database. GWAS data for Crohn's disease (CD) and ulcerative colitis (UC) were acquired from the OpenGWAS and GWASCatalog databases, respectively. Minerals and vitamins served as exposures, CD and UC as outcomes, and single nucleotide polymorphism (SNP) significantly associated with minerals and vitamins as instrumental variables. The inverse variance weighted (IVW) method was used as the primary method, supplemented by the MR⁃Egger, weighted median (WME), simple mode (SM), and weighted mode (WM) methods to analyze the causal association of minerals and vitamins with UC and CD. Sensitivity analysis was conducted using Cochran's Q test, MR⁃Egger regression intercept analysis, MR⁃PRESSO test, and leave⁃one⁃out method. Results Ten SNPs closely related to vitamin C were identified. IVW analysis revealed that a negative correlation of vitamin C with CD (OR<1, P<0.05). WME also supported this negative correlation (P<0.05). Although there was no statistically significant difference in the results of the MR⁃Egger, SM, and WM methods, their effect directions (OR<1) were consistent with the IVW results. A total of 6 SNPs related to copper were identified, showing a positive correlation of copper on UC (OR>1, P<0.05). Although there was no statistically significant difference in results of the MR⁃Egger, WME, SM, and WM methods, their effect directions (OR>1) were consistent with the IVW results. Sensitivity analysis revealed no significant heterogeneity, horizontal pleiotropy, or undue influence of any single SNP on the causal estimates. Conclusion Vitamin C may play an important role in the pathogenesis of CD, and copper may play a key role in the pathogenesis of UC.