Colorectal cancer (CRC) is a common malignant tumor that severely endangers human health. Exosomes show great potential in tumor immunotherapy. Increasingly studies have shown that exosome-related genes are effective prognostic biomarkers. Clinical information and gene expression data of CRC patients were obtained from gene expression omnibus and the cancer genome atlas. The data were then classified into training and independent validation sets. In the training set, exosome-related genes with a prognostic value were selected by univariate Cox analysis, least absolute shrinkage and selection operator Cox regression model, and stepwise Cox regression analysis. Risk scores were calculated based on the selected genes to stratify patients. The selected exosome-related genes were applied to establish a risk model. Based on 11 exosome-related genes, a prognostic risk model, which could stratify the risk both in the training and validation sets, was established. According to the survival curves, the prognoses of the high- and low-risk groups were significantly different. The AUCs of the risk model for prognostic prediction were 0.735 and 0.784 in the training and validation sets, respectively. A nomogram was constructed to predict the survival of CRC patients. Single-sample gene set enrichment analysis and ESTIMATE algorithms revealed that the risk model was related to immune cell infiltration. The value of the risk model in predicting immunotherapeutic outcomes was also confirmed. An exosome-related gene risk model was constructed to predict prognosis, evaluate microenvironment immune cell infiltration levels and bring a new perspective to CRC patient treatment.