This randomized phase II trial studies how well nivolumab works in eliminating any remaining cancer cells and preventing cancer from returning in patients with acute myeloid leukemia that had a decrease in or disappearance of signs and symptoms of cancer after receiving chemotherapy. Monoclonal antibodies, such as nivolumab, may block cancer growth in different ways by targeting certain cells.