Polymorphisms in the untranslated regions (UTRs) of the thymidylate synthase (TS) gene, which may modulate TS transcription and expression, have been associated with susceptibility and prognosis of several tumors. However, their effects on the development and clinical staging of esophageal squamous cell carcinoma (ESCC) and gastric cardiac adenocarcinoma (GCA) have not been assessed so far. In this study, the 28-bp tandem repeat and the G/C single nucleotide polymorphism in the TS 5'UTR, the 6-bp deletion (6 bp-) polymorphism in the TS 3'UTR, were genotyped in 465 cancer patients (232 ESCC, 233 GCA) and 348 control subjects in North China. The genotype and allelotype distribution of the TS variants in ESCC, GCA patients and controls did not show significant difference. However, the frequency of the 6 bp-/2R haplotype in ESCC and GCA patients was marginally or significantly lower than that in controls (P = 0.05 and 0.006, respectively). Thus, the 6 bp-/2R significantly reduced the risk to ESCC and GCA, compared with the 6 bp-/3G haplotype [odds ratio (OR) = 0.61 and 0.48, 95% confidence interval (CI) = 0.37-1.00 and 0.28-0.81, respectively]. In addition, the 6 bp+/3G haplotype in ESCC patients was also significantly less common than in controls (P = 0.002). Compared with the 6 bp-/3G haplotype, the 6 bp+/3G significantly reduced the risk to ESCC (OR = 0.30, 95% CI = 0.14-0.67). Moreover, the TS 2R/3G genotype frequency in ESCC patients with and without lymphatic metastasis was significantly different (27.1 versus 4.9%, P < 0.001). Therefore, the 2R/3G genotype had an approximately 11-fold increase in the risk of lymphatic metastasis of ESCC, compared with the 3G/3G genotype (95% CI = 2.67-49.74). The results suggested that the TS polymorphisms might be associated with the susceptibility to ESCC and GCA, and the 2R/3G genotype might be a candidate marker to predict the potential of lymphatic metastasis in ESCC.