Inclusion Criteria:
1. Written informed consent and HIPAA authorization for release of personal health information. NOTE: HIPAA authorization may be included in the informed consent or obtained separately.
2. Age ≥ 18 years at the time of consent.
3. ECOG Performance Status of 0-1 within 30 days prior to registration.
4. Histologically proven stage I (T1N0), IIA (T2N0), IIB (T1/2N1), or IIIA (T3 N0/1) invasive squamous cell carcinoma of the anus by AJCC version 9.
5. Patient deemed ineligible for standard of care treatment with 5-fluorouracil (5FU) and mitomycin-C (MMC) concurrently with radiation per treating investigator.
6. Patient is treatment naïve for anal cancer diagnosis.
7. Measurable disease according to RECIST v1.1 within 30 days prior to registration.
8. Archival or newly obtained tissue available for planned correlative analysis. If tissue is not available, subjects may choose to have a standard of care biopsy to meet eligibility.
9. Demonstrate adequate organ function as defined below. All screening labs to be obtained within 30 days prior to registration.
* White blood cell (WBC) ≥ 1500 K/mm\^3
* Absolute Neutrophil Count (ANC) ≥ 1500/mm\^3
* Hemoglobin (Hgb)a ≥ 9 g/dL
* Platelets (Plt) ≥ 100,000 g/dL
* Creatinine ≤ 1.5 × upper limit of normal (ULN) OR Measured or calculated creatinine clearance (GFR can also be used in place of creatinine or CrCl) ≥30 mL/min for creatinine levels \>1.5 × institutional ULN
* Total bilirubin ≤ 1.5 × ULN OR direct bilirubin ≤ULN for participants with total bilirubin levels \>1.5 × ULN
* Aspartate aminotransferase (AST) ≤ 2.5 × ULN
* Alanine aminotransferase (ALT) ≤ 2.5 × ULN
10. Females of childbearing potential who are sexually active with a male able to father a child must have a negative pregnancy test (serum or urine) within 14 days prior to registration.
11. Females of childbearing potential who are sexually active with a male able to father a child must be willing to abstain from heterosexual activity or use an effective method(s) of contraception. Males able to father a child who are sexually active with female of childbearing potential must be willing to abstain from heterosexual activity or to use an effective method(s) of contraception.
12. If a subject is HIV-infected, participants must have well-controlled HIV on antiretroviral therapy (ART), defined as:
1. Participants on ART must have a CD4+ T-cell count ≥350 cells/mm3 at the time of screening
2. Participants on ART must have achieved and maintained virologic suppression defined as confirmed HIV RNA level below 50 or the LLOQ (below the limit of detection) using the locally available assay at the time of screening and for at least 12 weeks before screening.
3. Participants must not have had any AIDS-defining opportunistic infections within the past 12 months.
4. Participants on ART must have been on a stable regimen, without changes in drugs or dose modification, for at least 4 weeks before study entry (Day 1) and agree to continue ART throughout the study. NOTE: HIV testing is not required for eligibility.
13. If a subject has evidence of chronic hepatitis B virus (HBV) infection, the HBV viral load must be undetectable on suppressive therapy, if indicated. If a subject has a history of hepatitis C virus (HCV) infection, it must have been treated and cured. For patients with HCV infection who are currently on treatment, the HCV viral load must be undetectable to be eligible for this trial. Testing is not required at screening unless mandated by local policy.
14. Ability of the subject to understand and comply with study procedures for the entire length of the study, as determined by the enrolling physician or protocol designee.
Exclusion Criteria:
1. Uncontrolled intercurrent illness including, but not limited to, ongoing or active infection requiring systemic therapy, symptomatic congestive heart failure, unstable angina pectoris, cardiac arrhythmia, or psychiatric illness/social situation that would limit compliance with study requirements.
2. Has known additional malignancy that is progressing or has required active treatment within the past 2 years and is not deemed by the investigator to be at low risk for recurrence.
Notes: Participants with basal cell carcinoma of the skin, squamous cell carcinoma of the skin or carcinoma in situ (ex. cervical, breast) that have undergone potentially curative therapy are eligible. Participants with carcinoma in situ of the bladder are not eligible. Participants with low-risk early-stage prostate cancer (T1-T2a, Gleason score ≤8, and PSA \<10 ng/mL) either treated with definitive intent or untreated in active surveillance with stable disease are eligible.
3. Pregnant or breastfeeding or expecting to conceive or father children within the projected duration of the study, starting with the screening visit through 120 days after the last dose of study drug(s). NOTE: breast milk cannot be stored for future use while the mother is being treated on study.
4. Has known active CNS metastases and/or carcinomatous meningitis. Participants with previously treated brain metastases may participate provided they are radiologically stable, i.e. without evidence of progression for at least 4 weeks by repeat imaging (note that the repeat imaging should be performed during study screening), clinically stable and without requirement of steroid treatment for at least 14 days prior to study registration.
5. Has severe hypersensitivity (≥Grade 3) to pembrolizumab and/or any of its excipients.
6. Patients with an active autoimmune disease requiring immunosuppression in the past 2 years.
7. Has a diagnosis of immunodeficiency or is receiving chronic systemic steroid therapy equivalent to \> 10mg prednisone per day or any other form of immunosuppressive therapy within 7 days prior to registration. NOTE: Topical corticosteroid or inhaled corticosteroids are allowed.
8. Has received a live vaccine or live-attenuated vaccine within 30 days prior to registration. Administration of killed vaccines is allowed. Examples of live vaccines include, but are not limited to, the following: measles, mumps, rubella, chicken pox, yellow fever, rabies, BCG, and typhoid oral vaccine. Intranasal influenza vaccines (e.g., Flu-Mist ®) are live attenuated vaccines and are not allowed. NOTE: No live vaccines may be administered while participating in the trial.
9. Has a history of (non-infectious) pneumonitis/interstitial lung disease that required steroids or has current pneumonitis/interstitial lung disease.
10. Has received any investigational drug or used an investigational device for the treatment of anal cancer within 30 days prior to registration.
11. Has had an allogeneic bone marrow/stem cell or solid organ transplant.
12. Has not adequately recovered from major surgery or has ongoing surgical complications.
13. Has a history or current evidence of any condition, therapy, or laboratory abnormality or other circumstance that might confound the results of the study, interfere with the participant's participation for the full duration of the study, such that it is not in the best interest of the participant to participate, in the opinion of the treating investigator.
14. Has known psychiatric or substance abuse disorders that would interfere with cooperation with the requirements of the trial.
15. Has had prior anti-PD1 immune checkpoint blockade.
16. Is taking a contraindicated medication and is unable to discontinue or switch to an alternative medication within 7 days of initiating the study drugs.