Hepcidin is the main regulator of iron homeostasis and dysregulation of proteins involved in iron metabolism has been associated with tumorogenesis. However, to date, no epidemiological study has researched the association between hepcidin levels and gastric cancer risk. To further investigate the relationship between hepcidin levels and gastric cancer risk, we conducted a nested case‐control study (EURGAST) within the multicentric European Prospective Investigation into Cancer and Nutrition study. The study included 456 primary incident gastric adenocarcinoma cases and 900 matched controls that occurred during an average of 11 years of follow‐up. We measured serum levels of hepcidin‐25, iron, ferritin, transferrin and C‐reactive protein. Odds ratios (ORs) and 95% confidence intervals (CIs) for the risk of gastric cancer by hepcidin levels were estimated from multivariable conditional logistic regression models. Mediation effect of the ferritin levels on the hepcidin‐gastric cancer pathway was also evaluated. After adjusting for relevant confounders, we observed a statistically significant inverse association between gastric cancer and hepcidin levels (OR 5 ng/l = 0.96, 95% CI = 0.93–0.99). No differences were found by tumor localization or histological type. In mediation analysis, we found that the direct effect of hepcidin only represents a nonsignificant 38% (95% CI: −69%, 91%). In summary, these data suggest that the inverse association of hepcidin levels and gastric cancer risk was mostly accounted by ferritin levels. Further investigation including repeated measures of hepcidin is needed to clarify their role in gastric carcinogenesis.