Background: Previous research indicates that poor dental health increases risks for certain types of cancers, including esophageal cancer. This study aimed to investigate the association with esophageal cancer using Swedish Dental Health Register. Methods: This is a prospective cohort study. The exposures were dental diagnoses classified into healthy, caries, root canal infection, mild inflammation, and periodontitis, as well as number of remaining teeth, at baseline and during multiple visits. The outcome was the incidence of esophageal cancer, which was further divided into esophageal adenocarcinoma (EAC) and esophageal squamous cell carcinoma (ESCC). Cox proportional hazards models were used to estimate hazard ratios (HRs) and its corresponding confidence intervals (CIs). Results: A total of 5,042,303 individuals were included in the study and 1,259 EAC and 758 ESCC cases were identified. Root canal infection at baseline was associated with 41% higher risk for EAC (HR=1.41, 95% CI: 1.10-1.82), while periodontitis at baseline was linked to 32% and 45% higher risks for respective histopathological subtypes (HR for EAC=1.32, 95% CI: 1.13-1.53; HR for ESCC=1.45, 95% CI: 1.20-1.75). Fewer remaining teeth at baseline also increased the risks for both histopathological types of esophageal cancer, with a dose-response effect (Ptrend < 0.01). Cox regression analyses with time-varying exposures corroborated the above-mentioned results. Conclusions: Impaired dental health prior to cancer diagnosis is associated with excess risks for both histopathological subtypes of esophageal cancer. Impact: Our study provided corroborating evidence for the association between poor oral health and esophageal cancer risk.