Purpose: The genetic basis of myelodysplastic syndromes (MDS) is heterogeneous, and various combinations of somatic mutations are associated with different clinical phenotypes and outcomes. Whether the genetic basis of MDS influences the outcome of allogeneic hematopoietic stem-cell transplantation (HSCT) is unclear. Patients and Methods: We studied 401 patients with MDS or acute myeloid leukemia (AML) evolving from MDS (MDS/AML). We used massively parallel sequencing to examine tumor samples collected before HSCT for somatic mutations in 34 recurrently mutated genes in myeloid neoplasms. We then analyzed the impact of mutations on the outcome of HSCT. Results: Overall, 87% of patients carried one or more oncogenic mutations. Somatic mutations of ASXL1, RUNX1, and TP53 were independent predictors of relapse and overall survival after HSCT in both patients with MDS and patients with MDS/AML (P values ranging from.003 to.035). In patients with MDS/AML, gene ontology (ie, secondary-type AML carrying mutations in genes of RNA splicing machinery, TP53-mutated AML, or de novo AML) was anindependent predictor of posttransplantation outcome (P =.013). The impact of ASXL1, RUNX1, and TP53 mutations on posttransplantation survival was independent of the revised International Prognostic Scoring System (IPSS-R). Combining somatic mutations and IPSS-R risk improved the ability to stratify patients by capturing more prognostic information at an individual level. Accounting for various combinations of IPSS-R risk and somatic mutations, the 5-year probability of survival after HSCT ranged from 0% to 73%. Conclusion: Somatic mutation in ASXL1, RUNX1, or TP53 is independently associated with unfavorable outcomes and shorter survival after allogeneic HSCT for patients with MDS and MDS/AML. Accounting for these genetic lesions may improve the prognostication precision in clinical practice and in designing clinical trials.