Gastric atrophy results in lower plasma ghrelin, higher gastrin secretion, a change in gut microbiota, and altered dietary nutrient absorption, which may be associated with the incidence of diabetes. Helicobacter pylori (H. pylori) infection is a major cause of gastric atrophy and is associated with diabetes in some reports. Since there is no study which investigates the impact of gastric atrophy on diabetes, we conduct a prospective cohort study to examine the relationship between H. pylori infection, gastric atrophy, and incident diabetes. In this study, subjects with gastric atrophy had a lower risk of incident diabetes, compared to those without gastric atrophy. The extent of gastric atrophy, measured by serum pepsinogen (PG) I/II ratio, was correlated with age, H. pylori IgG titer, HOMA2-IR, and HOMA2%B. When gastric atrophy is more extensive, presented as a lower serum PG I/II ratio, the risk of incident diabetes is lower. On the other hand, there was no significant association between H. pylori infection and the incidence of diabetes. In conclusion, the presence and the extent of gastric atrophy, but not H. pylori infection, are associated with incident diabetes. Further studies are needed to investigate the detailed mechanisms and the potential applications of the findings to guide diabetes screening and treatment strategies.