Introduction: The effect of lipid-lowering drugs on functional gastrointestinal disorders (FGIDs) remains unclear, and the assessment of their relationship is always confounded by extraneous factors. Material and methods: We detected genetic variants linked to LDL cholesterol (LDL-C) levels in or near the lipid-lowering drug targets (HMGCR, PPARG, PCSK9, and NPC1L1), using data from the Global Lipids Genetics Consortium (GLGC) genome-wide association study. Outcome data for FGIDs including seven disorders were extracted from genome-wide association studies (GWAS) datasets. Inverse-variance-weighted Mendelian randomization (IVW-MR) was conducted to identify the causal effect between four genetically proxied lipid-lowering drugs and FGIDs, and mediation Mendelian randomization (MR) was performed to investigate potential mediators. We employed several sensitivity analyses to validate the robustness of the results. Results: Seven variants were identified as proxies for LDL-C lowering through HMGCR inhibitors, 3 for PPARG inhibitors, 12 for PCSK9 inhibitors, and 3 for NPC1L1 inhibitors. IVW-MR analysis revealed that genetically proxied HMGCR-mediated LDL-C elevation significantly increased the risk of several gastrointestinal outcomes. These included functional constipation (OR = 1.258, 95% CI: 1.043–1.517), functional dyspepsia (OR = 1.438, 95% CI: 1.014–2.036), nausea and vomiting (OR = 1.536, 95% CI: 1.070–2.207), and disorders of the gallbladder, biliary tract and pancreas (OR = 1.664, 95% CI: 1.392–1.989). Furthermore, mediation analysis identified mood swings as a significant mediator. It accounted for 6.23% of the total effect on functional dyspepsia (–OR = 1.023, 95% CI: 1.001–1.058) and for 2.62% of the effect on disorders of the gallbladder, biliary tract, and pancreas (OR = 1.013, 95% CI: 1.001–1.033). Conclusions: Our study suggested a potential protective effect of HMGCR inhibitors on FGIDs, which may be mediated by a reduced risk of mood swings.