The hypomethylating agents (HMAs) azacitidine and decitabine are both approved for treatment of myelodysplastic syndromes (MDS) in the USA. In Europe, decitabine is not approved due to lack of survival advantage in randomized trials. The two drugs have not been compared in clinical trials. We identified patients diagnosed with MDS between 2004 and 2011 from the Surveillance, Epidemiology, and End Results (SEER)-Medicare linked database in the USA who received ≥ 10 doses of either HMA. We estimated survival from HMA initiation with Kaplan-Meier methods and used multivariate Cox proportional hazards models to adjust for covariates. Analyses controlled for histological subtype and we conducted a subset analysis limited to patients with refractory anaemia with excess blasts (RAEB). In 2025 HMA-treated patients, median survival was 15 months with no difference in survival based on the HMA received in adjusted analysis (decitabine versus azacitidine, hazard ratio = 1·06, 95% confidence interval: 0·94-1·19, P = 0·37). For RAEB patients (n = 523), median survival was 12 months, with no significant difference based on HMA received. No significant survival difference was found between azacitidine and decitabine in patients with MDS, including RAEB. Importantly, population-based survival of azacitidine-treated RAEB patients was substantially shorter than in the AZA-001 clinical trial (11 versus 24·5 months).