The following criteria is provided for health care professionals.
Inclusion Criteria:
* Patients with evidence of relapsed or refractory AML or MDS following allogeneic stem cell transplantation
* Patients must have received preparative regimens to include either busulfan- or melphalan-based regimens
* Patient must have achieved myeloid engraftment as defined by an absolute neutrophil count \>= 500 micro/L on 3 consecutive days
* Eastern Cooperative Oncology Group (ECOG) performance status =\< 2
* Total bilirubin =\< 2 times upper limit of normal (x ULN) (=\< 3 x ULN if considered to be due to Gilbert's syndrome)
* Aspartate aminotransferase or alanine aminotransferase =\< 2.5 x ULN
* Serum creatinine =\< 2 x ULN or glomerular filtration rate (GFR) \>= 50
* Patients must provide written informed consent
* The interval from the infusion of stem cells to time of initiation of nivolumab or ipilimumab will be at least 6 weeks (42 days)
* Females must be surgically or biologically sterile or postmenopausal (amenorrheic for at least 12 months) or if of childbearing potential, must have a negative serum or urine pregnancy test within 72 hours before the start of the treatment
* Women of childbearing potential must agree to use an adequate method of contraception during the study and until 3 months after the last treatment. Males must be surgically or biologically sterile or agree to use an adequate method of contraception during the study until 3 months after the last treatment
Exclusion Criteria:
* Patients with known allergy or hypersensitivity to nivolumab or ipilimumab or any of their components
* Patients with acute GVHD \> grade 2 at any time during the post-transplant course
* Patients with a known history of severe interstitial lung disease or severe pneumonitis or active pneumonitis that is uncontrolled in the opinion of the treating physician
* Patients with a known history of any of the following autoimmune diseases are excluded:
* Patients with a history of inflammatory bowel disease (including Crohn's disease and ulcerative colitis)
* Patients with a history of rheumatoid arthritis, systemic progressive sclerosis (scleroderma), systemic lupus erythematosus, autoimmune vasculitis (e.g., Wegener's granulomatosis)
* Patients with solid organ allografts (such as renal transplant) are excluded
* Ongoing immunosuppressive therapy for the treatment of GVHD. Patients receiving GVHD prophylaxis will be allowed on this study
* Patients with symptomatic central nervous system (CNS) leukemia at the time of evaluation or patients with poorly controlled CNS leukemia
* Active and uncontrolled disease/(active uncontrolled infection, uncontrolled hypertension despite adequate medical therapy, active and uncontrolled congestive heart failure New York Heart Association \[NYHA\] class III/IV, clinically significant and uncontrolled arrhythmia) as judged by the treating physician
* Patients with known human immunodeficiency virus seropositivity will be excluded
* Known to be positive for hepatitis B by surface antigen expression. Known to have active hepatitis C infection (positive by polymerase chain reaction or on antiviral therapy for hepatitis C within the last 6 months)
* Any other medical, psychological, or social condition that may interfere with study participation or compliance, or compromise patient safety in the opinion of the investigator
* Patients unwilling or unable to comply with the protocol
* Pregnant or breastfeeding