Because the association between soy consumption and gastric cancer is inconsistent, we evaluated the putative preventive effect of soy food on gastric cancer risk in the Shanghai Women's and Men's Health Studies, comprising a total of 128,687 participants. Intake of nonfermented soy foods was estimated using 2 validated food-frequency questionnaires. HRs were calculated with 95% CIs for intake amounts of total nonfermented soy food intake, soy protein, and isoflavones as well as individual soy food groups using Cox proportional hazards regression. A total of 493 distal gastric cancer cases were identified by 2010. Although all risk estimates for summary measures of soy food intake above the lowest quartile (quartile 1) were suggestive of a protective effect, no statistically significant associations with risk of distal gastric cancer were found. Among the separate soy food groups, significant reductions in risk of distal gastric cancer by increasing intake of tofu were found in men in quartile 2 (HR: 0.59; 95% CI: 0.40, 0.86), quartile 3 (HR: 0.62; 95% CI: 0.44, 0.88), and quartile 4 (HR: 0.64; 95% CI: 0.42, 0.99), resulting in a significant trend (P-trend = 0.02). Dry bean intake was also inversely associated with decreased risk of gastric cancer, but in postmenopausal women only [quartile 2 (HR: 0.54; 95% CI: 0.30, 0.96); quartile 3 (HR: 0.90; 95% CI: 0.64, 1.27); and quartile 4 (HR: 0.63; 95% CI: 0.43, 0.91)], resulting in a significant trend (P-trend = 0.03). Overall, our study found no statistically significant association between nonfermented soy food intake and distal gastric cancer risk, though the data supported the hypothesis that tofu may protect against distal gastric cancer in men and dry bean consumption may decrease the risk of gastric cancer in postmenopausal women.