Regular users of aspirin and other nonsteroidal anti-inflammatory drugs (NSAIDs) are at reduced risk of colon cancer, but the evidence for protective effects of NSAIDs elsewhere in the digestive tract is scant. We investigated the association between the use of NSAIDs and risk of esophageal and gastric cancer, using data from a large population-based, case-control study. Cases were individuals, ages 30-79 years, diagnosed with esophageal adenocarcinoma (n = 293), esophageal squamous cell carcinoma (n = 221), gastric cardia adenocarcinoma (n = 261), or noncardia gastric adenocarcinoma (n = 368) in three areas with population-based tumor registries. Controls (n = 695) were selected by random digit dialing and through the rosters of the Health Care Financing Administration. After controlling for the major risk factors, we found that current users of aspirin were at decreased risk of esophageal adenocarcinoma [odds ratio (OR), 0.37; 95% confidence interval (CI), 0.24-0.58], esophageal squamous cell carcinoma (OR, 0.49; 95% CI, 0.28-0.87), and noncardia gastric adenocarcinoma (OR, 0.46; 95% CI, 0.31-0.68), but not of gastric cardia adenocarcinoma (OR, 0.80; 95% CI, 0.54-1.19), when compared to never users. Risk was similarly reduced among current users of nonaspirin NSAIDs. The associations with current NSAID use persisted when we excluded use within 2 or 5 years of reference date, which might have been affected by preclinical disease in cases, and when we restricted analyses to subjects reporting no history of chronic gastrointestinal symptoms. Our findings add to the growing evidence that the risk of cancers of the esophagus and stomach is reduced in users of NSAIDs, although whether the association is causal in nature is not clear.