 This phase III trial studies the side effects and best dose of decitabine followed by mitoxantrone hydrochloride, etoposide, and cytarabine and to see how well they work in treating patients with acute myeloid leukemia or high-risk myelodysplastic syndrome that has returned after a period of improvement or does not respond to treatment. Drugs used in chemotherapy, such as mitoxantrone hydrochloride, etoposide, cytarabine, and decitabine, work in different ways to stop the growth of cancer cells, either by killing the cells, by stopping them from dividing, or by stopping them from spreading. Giving more than one drug combination chemotherapy may kill more cancer cells. 