This study aimed to detect the causal effect of ulcerative colitis (UC) on heart failure. A bidirectional two-sample Mendelian randomization (MR) analysis was performed. The causal impact of UC on heart failure was determined via MR by performing a genome-wide association study in which 4 UCs descending from European ancestors were set as individual exposures. The inverse-variance weighted (IVW) method was used as the main method, and 4 other methods were set as assistant parameters. Susbequently, the MR results were combined with meta-analysis results. The MR Egger method was employed to investigate pleiotropy. The leave-one-out method was utilized for sensitivity analysis. Furthermore, a reverse-directional study was conducted. There was evidence of the causal effect of UC on heart failure in MR estimates using 4 UC datasets. The IVW method revealed that the odds ratio (OR) = 1.03, 95% confidence interval (CI) = 1.01-1.06, P = 0.0441 when the first UC dataset was used
OR = 1.03, 95% CI = 1.01-1.05, P = 0.0445 when the second UC dataset was used
OR = 2046, 95% CI = 1.37-3.05E + 06, P = 0.0409 when the third UC dataset was used
and OR = 8.12E + 04, 95% CI = 29.09-2.27E + 08, P = 0.0052 when the fourth UC dataset was used. A meta-analysis of 4 MR studies revealed that UC had a statistically significant causal effect on heart failure (OR = 1.03, 95% CI = 1.01-1.05
P = 0.0074). Reverse MR analysis revealed that heart failure did not have a causal effect on UC. There was no pleiotropy. This MR study demonstrated that UC had a causal effect on heart failure and that there was no reverse causal effect.