BackgroundGastric cancer (GC) is the third leading cause of cancer death worldwide, and hypothyroidism has been identified as a potential influencing factor. Despite known associations between hypothyroidism and various cancers, the causal link between hypothyroidism and GC and potential mediators of this relationship remains unclear. This study aimed to clarify these relationships using Mendelian randomization (MR).MethodsUtilizing genetic variant information from the FinnGen and MRC Integrative Epidemiology Unit open genome-wide association studies (GWAS) databases, we conducted univariable and multivariable MR analyses to explore the causal relationship between hypothyroidism and GC risk. The analysis was adjusted for confounders such as BMI, smoking status, and alcohol intake, and included mediator MR analysis to examine the role of high cholesterol.ResultsWe identified a significant inverse association between hypothyroidism and GC risk (OR = 0.93, 95% CI= 0.89–0.98, P = 0.003), with no evidence of reverse causation or pleiotropy. Adjustments for Helicobacter pylori infection weakened this association. Mediator analysis highlighted high cholesterol levels, chronic hepatitis B infection, and diabetes/endocrine disease status as significant mediators of the protective effect of hypothyroidism on GC risk.ConclusionOur findings suggest that hypothyroidism may confer a protective effect against GC, mediated in part by high cholesterol and other factors. These results underscore the importance of thyroid function and metabolic health in GC risk, offering new insights for preventive strategies and highlighting the need for further research into these complex associations.