Background: The interleukin (IL) plays a role in the development of acute pancreatitis (AP). However, the specific IL in AP has not been fully revealed. Therefore, the association between prospective IL and AP was studied via Mendelian randomization (MR). Methods: The HUGO Gene nomenclature committee (HGNC) database provided 47 interleukin related genes (ILRGs). ILRGs and differentially expressed genes (DEGs) from GSE194331 were overlapped to create differently expressed ILRGs (DE-ILRGs). The integrative epidemiology unit (IEU) open genome-wide association study (GWAS) database provided exposure and outcome datasets. Univariate MR (UVMR) analysis using MR-Egger, IVW, simple mode, and weighted mode was done. UVMR results were verified using sensitivity analysis. Drug prediction, MVMR analysis, and PPI network development were also performed. Results: Six DE-ILRGs were obtained. IL27 and IL1RN were substantially causally linked with AP by UVMR analysis (OR = 0.926, P < 0.001 and OR = 1.031, P = 0.023). Our sensitivity analysis showed the dependability of our results. Direct effect of IL27 was suggested by MVMR analysis. In the cytokine receptor binding pathway, IL27 and IL1RN interacted with IL36G and IL1R2. TAE-684, ARQ-680, and 12 other IL1RN and 14 IL27 medications were predicted. Conclusions: IL1RN was identified as a risk factor for acute pancreatitis (AP), but IL27 was found to be a protective factor for AP.