Relapse remains high in patients with myelodysplastic syndrome-refractory anaemia with excess blasts (RAEB) or secondary acute myeloid leukaemia evolving from myelodysplastic syndrome undergoing allogeneic haematopoietic stem-cell transplantation (HSCT). We aimed to investigate whether granulocyte-colony stimulating factor (G-CSF) and decitabine plus busulfan-cyclophosphamide conditioning reduced relapse compared with busulfan-cyclophosphamide in this population. We did an open-label, randomised, phase 3 trial at six hospitals in China. Eligible patients (aged 14-65 years) had myelodysplastic syndrome-RAEB or secondary acute myeloid leukaemia evolving from myelodysplastic syndrome, and an Eastern Cooperative Oncology Group performance status of 0-2 and HSCT comorbidity index of 0-2. Patients were randomly assigned (1:1) to receive G-CSF, decitabine, and busulfan-cyclophosphamide conditioning or busulfan-cyclophosphamide conditioning. Randomisation was done with permuted blocks (block size four) with no stratification and was implemented through an interactive web-based response system, which was independent of study site staff and investigators. G-CSF, decitabine, and busulfan-cyclophosphamide conditioning comprised G-CSF 5 μg/kg daily subcutaneously (days -17 to -10), decitabine 20 mg/m2 daily intravenously (days -14 to -10), busulfan 3·2 mg/kg daily intravenously (days -7 to -4), and cyclophosphamide 60 mg/kg daily intravenously (days -3 and -2). Busulfan-cyclophosphamide conditioning comprised the same dose and duration of busulfan and cyclophosphamide. The primary endpoint was 2 year cumulative incidence of relapse. All efficacy and safety endpoints were assessed in the intention-to-treat population. This trial is registered with ClinicalTrials.gov, NCT02744742; the trial is complete. Between April 18, 2016, and Sept 30, 2019, 297 patients were screened for eligibility, 202 of whom were randomly assigned to G-CSF, decitabine, and busulfan-cyclophosphamide (n=101) or busulfan-cyclophosphamide (n=101) conditioning. 123 (61%) participants were male and 79 (31%) were female. Median follow-up was 32·4 months (IQR 10·0-43·0). The 2-year cumulative incidence of relapse was 10·9% (95% CI 5·8-17·9) in the G-CSF, decitabine, and busulfan-cyclophosphamide group and 24·8% (16·8-33·5) in the busulfan-cyclophosphamide group (hazard ratio 0·39 [95% CI 0·19-0·79]; p=0·011). Within 100 days after transplantation, the most common grade 3-4 adverse events in the G-CSF, decitabine, and busulfan-cyclophosphamide group and the busulfan-cyclophosphamide group were infections (34 [34%] and 32 [32%]), acute graft-versus-host disease (30 [30%] and 30 [30%]), and gastrointestinal toxicity (28 [28%] and 29 [29%]). 11 (11%) patients in the G-CSF, decitabine, and busulfan-cyclophosphamide group and 13 (13%) in the busulfan-cyclophosphamide group died of adverse events. There were no treatment related deaths. Our results suggest that G-CSF, decitabine, and busulfan-cyclophosphamide conditioning is a better choice than busulfan-cyclophosphamide conditioning for patients with myelodysplastic syndrome-RAEB or secondary acute myeloid leukaemia evolving from myelodysplastic syndrome undergoing allogeneic HSCT. This conditioning could be a suitable therapuetic option for this patient population. None. For the Chinese translation of the abstract see Supplementary Materials section.