Studies that have investigated the epidemiological relationship between bronchiectasis and cancers are scarce. In this study, we investigated the incidence and risk of cancer in 53,755 patients newly hospitalized with bronchiectasis between 1998 and 2010 using data from the Taiwan National Health Insurance Research Database. The comparison cohort comprised 215,020 people from the general population without bronchiectasis. The follow-up period extended from the initial hospitalization date for bronchiectasis to the date of a cancer diagnosis, censoring, or 31 December 2011. We used Cox proportional hazard regression models to analyze the risks of cancer by including the variables of sex, age, and comorbidities. The overall cancer incidence was higher in patients with bronchiectasis than in the comparison cohort (17.0 vs. 12.2 per 1000 person-years). The bronchiectasis patients exhibited a 1.46-fold greater risk of cancer than did the comparison cohort after we adjusted for age, sex and comorbidities [adjusted hazard ratio (aHR) = 1.46, 95% CI = 1.41-1.52]. Although the cancer incidence increased with age in both cohorts, the younger patients with bronchiectasis exhibited the greatest risk of cancer compared with the comparison cohort. Patients with bronchiectasis had a considerably higher risk of lung cancer (aHR = 2.40, 95% CI = 2.22-2.60), oesophageal cancer (aHR = 2.06, 95% CI = 1.61-2.64), and hematologic malignancy (aHR = 2.02, 95% CI = 1.72-2.37) than did the comparison cohort. This nationwide cohort study suggested the patients with bronchiectasis exhibited increased substantial risks of certain cancer compared with the general population.