Colorectal cancer (CRC) ranks among the most prevalent malignancies affecting the gastrointestinal tract. The infiltration of CD8+ T cells significantly influences the prognosis and progression of tumor patients. This study establishes a CRC immune risk model based on CD8+ T cell-related genes. CD8+ T cell-related genes were identified through Weighted Gene Co-expression Network Analysis (WGCNA), and the enriched gene sets were annotated via Gene Ontology (GO) and Reactome pathway analysis. Employing machine learning methods, including the Least Absolute Shrinkage and Selection Operator (LASSO) algorithm and Random Forest (RF), we identified nine genes associated with CD8+ T-cell infiltration. The infiltration levels of immune cells in CRC tissues were assessed using the ssGSEA algorithm. These genes provide a foundation for constructing a prognostic model. The TCGA-CRC sample model's prediction scores were categorized, and the prediction models were validated through Cox regression analysis and Kaplan-Meier curve analysis. Notably, although CRC tissues with higher risk scores exhibited elevated levels of CD8+ T-cell infiltration, they also demonstrated heightened expression of immune checkpoint genes. Furthermore, comparison of microsatellite instability (MSI) and gene mutations across the immune subgroups revealed notable gene variations, particularly with APC, TP53, and TNNT1 showing higher mutation frequencies. Finally, the predictive model's efficacy was corroborated through the use of Tumor Immune Dysfunction and Exclusion (TIDE), Immune Profiling Score (IPS), and immune escape-related molecular markers. The predictive model was validated through an external cohort of CRC and the Bladder Cancer Immunotherapy Cohort. CLRN3 expression levels in tumor and adjacent normal tissues were assessed using quantitative real-time polymerase chain reaction (qRT-PCR) and western blot. Subsequent in vitro and in vivo experiments demonstrated that CLRN3 knockdown significantly attenuated the malignant biological behavior of CRC cells, while overexpression had the opposite effect. This study presents a novel prognostic model for CRC, providing a framework for enhancing the survival rates of CRC patients by targeting CD8+ T-cell infiltration.