Cancer may increase risk of active tuberculosis but evidence is sparse. We therefore examined tuberculosis risk in patients with incident cancer using Danish nationwide medical databases.We conducted a matched follow-up study comparing risk of active tuberculosis in cancer-exposed individuals to that in a general population comparison cohort, matched on gender, age, and country of origin, in different follow-up intervals using Cox regression.We identified 290,944 patients with incident cancer and 871,147 matched comparison cohort members during 1 January, 2004-30 November, 2013. After adjusting for comorbidities, the overall adjusted hazard ratio (aHR) for tuberculosis among cancer patients was 2.48 (95% confidence interval [CI]: 1.99-3.10). The highest tuberculosis risks were observed following cancers of the aerodigestive tract (aHR = 8.12; 95% CI: 4.33-15.22), tobacco-related cancers (aHR = 5.01; 95% CI: 3.37-7.44), and hematological cancers (aHR = 4.88; 95% CI: 2.27-10.48). Tuberculosis risk was highly elevated within the first year after cancer diagnosis (aHR = 4.14; 95% CI: 2.88-5.96), with a 6.78-fold increased aHR for cancer patients receiving cytostatics or radiotherapy. Beyond five years of observation, the overall aHR for tuberculosis remained at 2.66 (95% CI: 1.22-5.81).Cancer is a clinical predictor for increased risk of active tuberculosis, probably related to decreased infection barriers, immunosuppression, and shared risk factors.