Research investigating incident malignancy risk in erythropoiesis-stimulating agent (ESA) users with chronic kidney disease (CKD) is lacking. We aimed to compare the incident cancer risk between ESA and non-ESA users with CKD or end-stage renal disease (ESRD). In this retrospective cohort study, all adults newly diagnosed with CKD or ESRD between 2000 and 2012 were enrolled. The study population included 98,748 patients. After case–control matching, 7115 patients were included. The defined daily dose (DDD) of ESA was used as the unit for measuring the amount of ESA prescribed. The primary outcome was the risk of incident malignancy. The secondary outcomes were incident malignancy risk in different tertiles of cumulative ESA doses and the risk of different types of cancers. The risk of incident malignancy was 1.84 times higher with ESA treatment than without ESA treatment (hazard ratio, 1.84; 95% confidence interval, 1.43–2.36; p < 0.001). The malignancy risk was positively correlated with the cumulative dose of ESA (p-for-trend = 0.001) and a significant difference in the high annual cumulative DDD cohort (hazard ratio [HR], 2.39; 95% confidence interval [CI], 1.76–3.25; p < 0.001). The risk of genitourinary malignancy was 12.55 times higher with ESA treatment than without ESA treatment (HR, 12.55; 95% CI, 5.78–27.24; p < 0.001). ESA usage is associated with an increased risk of malignancy, particularly genitourinary cancers, in patients with CKD or ESRD. Clinicians should be aware of the occurrence of malignancy, and keep ESA dosage as low as possible.