There are suggestions that duodenal ulcer protects individuals from gastric cancer and that rice is ulcerogenic while wheat is gastro-protective. We aimed to examine the relationship of gastric cancer, duodenal and gastric ulcers in different geographical regions in China and identified dietary risk factors for duodenal ulcer and gastric cancer. The prevalence of peptic ulcer and gastric cancer among symptomatic patients in eight major cities, four each from the north and the south representing all the six defined regions of China were studied. Endoscopy and case records over a 10 year period were reviewed and cases of confirmed duodenal and gastric ulcer and gastric cancer, together with the total number of endoscopies performed per year, were recorded. Rates were expressed as cases/1000 endoscopies. Results were compared to another epidemiological study on diet and mortality in the same regions in China conducted at the same time. Duodenal ulcer rates were 2.4-fold higher in southern China than northern China, whereas gastric cancer rates were 1.6-fold higher in the north than in the south. Correlation studies showed for the first time an inverse linear relationship between the gastric cancer rates and the duodenal ulcer rates (r = −0.8076, P = 0.015), as well as the duodenal ulcer:gastric ulcer ratios (r = −0.9133, P = 0.002). Gastric ulcer rates were higher in southern China but did not correlate with the gastric cancer rates (r = 0.1455, P = 0.731). Duodenal ulcer rates were found to be related to daily rice intake (r = 0.8554, P = 0.029) and inversely related to daily wheat flour intake (r = −0.8472, P = 0.033). Gastric cancer rates were not related to any dietary risk factors tested. We concluded there was an inverse relationship between gastric cancer rates and duodenal ulcer rates. Although duodenal ulceration and gastric cancer are both linked to Helicobacter pylori infection, the findings of this study indicate independent additional aetiological factors for the pathogenesis of these conditions. Dietary factors such as rice or wheat intake may play a role.