This phase I/II trial studies the side effects and best dose of guadecitabine when given together with atezolizumab and to see how well they work in treating patients with myelodysplastic syndrome or chronic myelomonocytic leukemia that has spread to other places in the body and has come back or does not respond to treatment. Guadecitabine may stop the growth of cancer cells by blocking some of the enzymes needed for cell growth. Monoclonal antibodies, such as atezolizumab, may interfere with the ability of cancer cells to grow and spread. Giving guadecitabine and atezolizumab may work better in treating patients with myelodysplastic syndrome or chronic myelomonocytic leukemia.