Guadecitabine and Pembrolizumab in Treating Patients With Recurrent Ovarian, Primary Peritoneal, or Fallopian Tube Cancer

The purpose of this study is to look at how patients respond to treatment with guadecitabine and pembrolizumab. The researchers will also be looking at the amount of time it takes for cancer to get worse when participants take the study drugs. All participants will be treated with guadecitabine and pembrolizumab. Guadecitabine interferes with the cancer cells' DNA and can increase the production of certain proteins, making cancer cells more recognizable by the immune system. Pembrolizumab helps your immune system to kill cancer cells. Thus the combination of guadecitabine and pembrolizumab may increase the ability of the immune system to eliminate cancer cells. Researchers want to find out whether the combination of guadecitabine and pembrolizumab is effective in treating ovarian cancer that has not responded to traditional chemotherapy. Participants will keep receiving treatment until their cancer gets worse, they have side effects, or they decide they don't want to receive the treatment anymore. After stopping treatment, the study doctor will watch participants for side effects and follow their condition every 6-12 weeks. The study aims to keep track of participants' medical conditions for the rest of their lives. This helps us look at the long-term effects of the study drugs.

PRIMARY OBJECTIVES:

I. Measure objective response rate (RR) to guadecitabine and pembrolizumab in subjects with recurrent platinum resistant ovarian cancer (OC).

SECONDARY OBJECTIVES:

I. Measure progression free survival (PFS) for the combination of guadecitabine and pembrolizumab.

II. Progression free survival (PFS). III. Measure clinical benefit rate (CBR) for the combination of guadecitabine and pembrolizumab.

IV. Measure toxicity profiles to the combination of guadecitabine and pembrolizumab.

TERTIARY OBJECTIVES:

I. NY-ESO-1 and MAGE antigens' promoter methylation (pyrosequencing) and messenger ribonucleic acid (mRNA) expression levels (quantitative reverse transcriptase-polymerase chain reaction \[RT-PCR\]) will be measured before and after treatment in deoxyribonucleic acid (DNA) (plasma and/or tumor biopsies) and ribonucleic acid (RNA) (tumor biopsies), respectively.

II. Cytokine response (IFN gamma IL2, IL6, IL10, TNF alpha) will be measured in plasma by enzyme-linked immunosorbent assay (ELISA).

III. Measure LINE 1 methylation in DNA extracted from peripheral blood mononuclear cells (PBMCs) (measured on days 1 and 5 of cycles 1 and 2).

IV. Expression of the PD-L1 ligand will be measured by immunohistochemistry (IHC) in archival tumors.

V. Tumor infiltrating lymphocytes (TILs) will be quantified in tumor biopsies before and after treatment (IHC).

OUTLINE:

Patients receive guadecitabine subcutaneously (SC) on days 1-4 and pembrolizumab intravenously (IV) over 30 minutes on day 5. Courses repeat every 21 days in the absence of disease progression or unacceptable toxicity.

After completion of study treatment, patients are followed up at 30 days, every 6 weeks for 1 year, and then every 9 weeks and, once a subject experiences confirmed disease progression or starts a new anticancer therapy, every 3 months thereafter.

Eligibility Criteria:
Inclusion Criteria:

* Patients must have a histological or cytological evidence/confirmation of recurrent epithelial ovarian cancer, primary peritoneal carcinomatosis, or fallopian tube cancer
* Patients must have measurable disease according to Response Evaluation Criteria in Solid Tumors (RECIST) 1.1 within 28 days prior to registration
* Prior therapy allowed:

  * At least one and no more than 3 platinum based chemotherapy regimens
  * Up to 2 non-platinum, cytotoxic regimen
  * There is no limit on use of prior biological therapies (hormonal or targeted therapy)
  * NOTE: Prior immunotherapy is not allowed
* Patients must exhibit an Eastern Cooperative Oncology Group (ECOG), performance status of 0-1 within 14 days prior to registration
* Demonstrate adequate organ function as defined below; all screening labs to be obtained within 14 days prior to treatment initiation:
* Absolute neutrophil count (ANC) \>= 1,500/mcL
* Platelets \>= 100,000/mcL
* Hemoglobin \>= 9 g/dL or \>= 5.6 mmol/L (without transfusion or growth factor support/erythropoietin \[EPO\] dependency)
* Serum creatinine =\< 1.5 X upper limit of normal (ULN) OR measured or calculated creatinine clearance (glomerular filtration rate \[GFR\] can also be used in place of creatinine or creatinine clearance \[CrCl\]) \>= 60 mL/min for subject with creatinine levels \> 1.5 X institutional ULN
* Serum total bilirubin =\< 1.5 X ULN OR direct bilirubin =\< ULN for subjects with total bilirubin levels \> 1.5 ULN
* Aspartate aminotransferase (AST) (serum glutamic oxaloacetic transaminase \[SGOT\]) and alanine aminotransferase (ALT) (serum glutamate pyruvate transaminase \[SGPT\]) =\< 2.5 X ULN OR =\< 5 X ULN for subjects with liver metastases
* Albumin \>= 2.5 mg/dL
* International normalized ratio (INR) or prothrombin time (PT) =\< 1.5 X ULN unless subject is receiving anticoagulant therapy as long as PT or partial thromboplastin time (PTT) is within therapeutic range of intended use of anticoagulants
* Activated partial thromboplastin time (aPTT) =\< 1.5 X ULN unless subject is receiving anticoagulant therapy as long as PT or PTT is within therapeutic range of intended use of anticoagulants
* Be willing to allow the use of archival formalin-fixed paraffin-embedded tumor tissue for correlative analyses

  * Note: The archived tumor tissue specimens may be from prior surgery or from prior diagnostic biopsy of primary or metastatic tumor specimen; unavailability of archived tissue will not render subject ineligible for study
* Be willing and able to undergo a core or excisional tumor biopsy according to institutional standards (guided visually or by computed tomography \[CT\] or ultrasound), paracentesis, or thoracentesis for tumor cells

  * Note: This is to be done prior to treatment at cycle 1 day 1 (C1D1) and post-treatment (cycle 2 day 8), if this is clinically and safely feasible to do so; this will allow the use of this freshly obtained tissue for correlative analyses in the study
* Females of child-bearing potential (FOCBP) must agree to use adequate contraception prior to registration, for the duration of study participation, and for 120 days following completion of therapy; should a female patient become pregnant or suspect she is pregnant while participating in this study, she should inform her treating physician immediately

  * NOTE: A FOCBP is any woman (regardless of sexual orientation, having undergone a tubal ligation, or remaining celibate by choice) who meets the following criteria:

    * Has not undergone a hysterectomy or bilateral oophorectomy
    * Has had menses at any time in the preceding 12 consecutive months (and therefore has not been naturally postmenopausal for \> 12 months)
* FOCBP must have a negative pregnancy test within 7 days prior to registration on study
* Patients must have the ability to understand and the willingness to sign a written informed consent prior to registration on study

Exclusion Criteria:

* Has had prior chemotherapy, targeted small molecule therapy, or radiation therapy within 14 days prior to registration or who has not recovered (i.e., =\< grade 1 or at baseline) from adverse events due to a previously administered agent

  * NOTE: Subjects with =\< grade 2 neuropathy are an exception to this criterion and may qualify for the study
  * NOTE: If subject received major surgery, they must have recovered adequately from the toxicity and/or complications from the intervention prior to starting therapy
* Has had a prior anti-cancer monoclonal antibody (mAb) within 28 days prior to registration or who has not recovered (i.e., =\< grade 1 or at baseline) from adverse events due to agents administered more than 4 weeks earlier
* Is currently participating and receiving study therapy or has participated in a study of an investigational agent and received study therapy or used an investigational device within 28 days registration
* Has a diagnosis of immunodeficiency or is receiving systemic steroid therapy or any other form of immunosuppressive therapy within 7 days prior to the first dose of trial treatment
* Has a known additional malignancy that is progressing or requires active treatment; exceptions include basal cell carcinoma of the skin or squamous cell carcinoma of the skin that has undergone potentially curative therapy or in situ cervical cancer
* Has known active central nervous system (CNS) metastases and/or carcinomatous meningitis; subjects with previously treated brain metastases may participate provided they are stable (without evidence of progression by imaging for at least 28 days prior to registration and any neurologic symptoms have returned to baseline), have no evidence of new or enlarging brain metastases, and are not using steroids for at least 7 days prior to trial treatment; this exception does not include carcinomatous meningitis which is excluded regardless of clinical stability
* Has active autoimmune disease that has required systemic treatment in the past 2 years (i.e. with use of disease modifying agents, corticosteroids or immunosuppressive drugs); replacement therapy (e.g. thyroxine, insulin, or physiologic corticosteroid replacement therapy for adrenal or pituitary insufficiency, etc.) is not considered a form of systemic treatment
* Has received prior therapy with an anti-PD-1, anti-PD-L1, or anti-PD-L2 agent; please contact the principal investigator for further clarification if needed
* Hypersensitivity to pembrolizumab or any of its excipients
* Has a known history of active TB (Bacillus tuberculosis)
* Has a known history of human immunodeficiency virus (HIV) (HIV 1/2 antibodies) infection
* Has a known history of hepatitis B and/or hepatitis C infection
* Has known history of, or any evidence of active, non-infectious pneumonitis
* Has an active infection requiring systemic therapy within 3 days of registration (NOTE: except for uncomplicated urinary tract infection \[UTI\])
* Has a history or current evidence of any condition, therapy, or laboratory abnormality that might confound the results of the trial, interfere with the subject's participation for the full duration of the trial, or is not in the best interest of the subject to participate, in the opinion of the treating investigator
* Has known psychiatric or substance abuse disorders that would interfere with cooperation with the requirements of the trial
* Has received a live vaccine within 30 days of planned start of study therapy

  * Note: Seasonal influenza vaccines for injection are generally inactivated flu vaccines and are allowed; however intranasal influenza vaccines (e.g., Flu-Mist) are live attenuated vaccines, and are not allowed
* Female patients who are pregnant or nursing, or expecting to conceive within the projected duration of the trial, starting with the pre-screening or screening visit through 120 days after the last dose of trial treatment; subjects should not breast feed within 120 days of completing the trial
* Is or has an immediate family member (e.g., spouse, parent/legal guardian, sibling or child) who is investigational site or sponsor staff directly involved with this trial, unless prospective Institutional Review Board (IRB) approval (by chair or designee) is given allowing exception to this criterion for a specific subject