Autophagy-related genes have a vital effect on colorectal cancer (CRC) by affecting genomic stability and regulating immune responses. However, the associations between genetic variants in autophagy-related genes and CRC outcomes for chemotherapy therapy remain unclear. The Cox regression model was used to evaluate the associations between single-nucleotide polymorphisms (SNPs) in autophagy-related genes and overall survival (OS) and progression-free survival (PFS) of CRC patients. The results were corrected by the false discovery rate (FDR) correction. We used the logistic regression model to investigate the associations of SNPs with the disease control rate (DCR) of patients. Gene expression analysis was explored based on an in-house dataset and other databases. The associations between gene expression and infiltrating immune cells were evaluated using the Tumor Immune Estimation Resource (TIMER) database. We observed that ATG2B rs17094017 A > T was significantly associated with increased OS (HR = 0.65, 95% CI = 0.50-0.86, P = 2.54×10-3), PFS (HR = 0.76, 95% CI = 0.62-0.93, P = 7.34×10-3), and DCR (OR = 0.60, 95% CI = 0.37-0.96, P = 3.31×10-2) of CRC patients after chemotherapy. The expression of ATG2B was down-expressed in CRC tissues than in adjacent normal tissues. Moreover, ATG2B expression influenced the infiltration of CD8+ T cells, CD4+ T cells, B cells, and T cell receptor signaling pathways, which may inhibit the occurrence of CRC by affecting the immune system. This study suggests that genetic variants in the autophagy-related gene ATG2B play a critical role in predicting the prognosis of CRC prognosis undergoing chemotherapy.