PURPOSE:To study the effects of immunosuppression on treatment toxicity, long-term cancer recurrence risk, and survival among human immunodeficiency virus (HIV)-positive anal cancer patients. METHODS AND MATERIALS:From a nationwide retrospective cohort of veterans with anal cancer we identified 142 HIV-positive patients with stage I-III disease, diagnosed between 2000 and 2015 and treated with definitive-intent chemotherapy and radiation. We used regression models to study the impact of pretreatment CD4 counts and longitudinal posttreatment CD4 counts on outcomes including acute toxicity, long-term ostomy rates, cancer recurrence, cancer-specific survival, and overall survival. All models were adjusted for potential confounders. RESULTS:The median pretreatment CD4 count was 375 cells/mm3, which dropped to 157 cells/mm3 after treatment. Each 100-cell/mm3 decrease in pretreatment CD4 count was associated with an increased risk of acute hematologic toxicity (odds ratio 1.19, 95% confidence interval [CI] 1.01-1.42, P=.04) and hospitalization for hematologic toxicity (odds ratio 1.24, 95% CI 1.00-1.54, P=.049) but not gastrointestinal toxicity, tumor recurrence, or cancer-specific mortality (P>.05). Each 100-cells/mm3 decrease in posttreatment CD4 count increased the risk of recurrence by 54% (hazard ratio 1.54, 95% CI 1.09-2.17, P=.01) and cancer mortality by 46% at a trend level (hazard ratio 1.46, 95% CI 0.99-2.14, P=.06). Neither pre- nor posttreatment CD4 count influenced long-term ostomy rates or overall survival (all P>.05). CONCLUSIONS:Lower pretreatment CD4 counts were associated with acute hematologic toxicity, and lower posttreatment CD4 count levels were associated with an increased risk of tumor recurrence. These results suggest that immune surveillance may play an important role in long-term disease control in anal cancer.