DOSE ESCALATION STUDY  Key Inclusion Criteria:  Patients with documented diagnosis of acute myeloid leukemia (AML) based on the last version of the World Health Organization classification and eligible to second or third line of treatment. Patients with documented diagnosis of refractory melyodisplastic syndrome in second or third line of treatment, and with high risk at prognosis based on the IPSS-R scoring system. ECOG performance status ≤ 1 Patients are able to understand, sign, and date the written informed consent form at screening visit prior to any protocol-specific procedures Patients are able and willing to comply with study procedures as per protocol, including bone marrow biopsies  Key Exclusion Criteria:  Patients eligible to a standard of care Patients eligible to hematopoietic stem cell transplantation (HSCT) at the time of inclusion Patients diagnosed with acute promyelocytic leukemia (M3) Patients with clinically active CNS leukemia Patients with HSCT within 100 days prior to the first administration of AB8939 Women who are lactating/breastfeeding or who plan to breastfeed while on study Women with a positive pregnancy test  Other protocol-defined inclusion/exclusion criteria may apply  EXPANSION COHORT STUDY  Key Inclusion Criteria:  Patients with documented diagnosis of acute myeloid leukemia (AML) based on the last version of the World Health Organization classification and eligible to second or third line of treatment. ECOG performance status ≤ 2 Patients are able to understand, sign, and date the written informed consent form at screening visit prior to any protocol-specific procedures Patients are able and willing to comply with study procedures as per protocol, including bone marrow biopsies  Key Exclusion Criteria:  Patients eligible to a standard of care Patients eligible to hematopoietic stem cell transplantation (HSCT) at the time of inclusion Patients diagnosed with acute promyelocytic leukemia (M3) Patients with clinically active CNS leukemia Patients with HSCT within 100 days prior to the first administration of AB8939 Women who are lactating/breastfeeding or who plan to breastfeed while on study Women with a positive pregnancy test  Other protocol-defined inclusion/exclusion criteria may apply