The incidence of venous thromboembolism in cancer patients may have changed in the past decade, possibly due to novel cancer therapies, improved survival, and high-resolution imaging. Danish medical registries were used to identify 499,092 patients with a first-time cancer diagnosis between 1997 and 2017, who were matched to 1,497,276 comparison individuals without cancer from the general population. We computed cumulative incidences of venous thromboembolism 6 and 12 months after the diagnosis/index date. Hazard ratios (HRs) were calculated using Cox regression. Risk factors were examined by computing subdistribution hazard ratios (SHRs) in a competing risk analysis. Cumulative incidence of venous thromboembolism 12 months after the cancer diagnosis/index date was 2.3% (95% confidence interval (CI), 2.2%-2.3%) in the cancer cohort and 0.35% (95% CI, 0.34%-0.36%) in the comparison cohort (HR, 8.5; 95% CI, 8.2-8.8). Important risk factors for cancer patients were prior venous thromboembolism (SHR, 7.6; 95% CI, 7.2-8.0), distant metastasis (SHR, 3.2; 95% CI, 2.9-3.4), and use of chemotherapy (SHR, 3.4; 95% CI, 3.1-3.7), protein kinase inhibitors (SHR, 4.1; 95% CI 3.4-4.9), anti-angiogenic therapy (SHR, 4.4; 95% CI, 3.8-5.2), and immunotherapy (SHR, 3.6; 2.8-4.6). Twelve-month incidence in the cancer cohort increased from 1.0% (95% CI, 0.9%-1.2%) in 1997 to 3.4% (95% CI, 2.9%-4.0%) in 2017, which was paralleled by improved 12-month survival and increased use of computed tomography (CT) scans, chemotherapy, and targeted therapies. In conclusion, the risk of venous thromboembolism in cancer patients is increasing steadily and is 9-fold higher than in the general population.