This randomized, 3-arm Phase 2 study will compare the safety and efficacy of single-agent azacitidine (currently 1 of 3 approved treatments for myelodysplastic syndrome \[MDS\]) to that of single-agent MGCD0103 and to that of combination therapy with MGCD0103 and azacitidine in elderly patients with acute myelogenous leukemia (AML) or intermediate-2 (Int-2) or high-risk MDS, for whom no standard of care exists. The goal of the study is to determine which of the 3 treatment arms are worthy of further investigation in a subsequent Phase 3 study of elderly subjects with AML or Int-2 or high-risk MDS.