Colorectal cancer (CRC) remains a common malignant tumor of digestive tract with high incidence rate and high mortality in the worldwide. The current clinical treatments of CRC often fail to achieve satisfactory results. Searching for more effective prediction or prognosis biomarkers, or developing more targeted therapeutic schedule may help to improve the outcomes of CRC patients. Here, we tried to study the effect of ferroptosis-related genes on CRC prognosis and make it clearer that ferroptosis has connection with immune environment. First, we obtained gene expression data of CRC and normal tissues, as well as corresponding clinical data from the Gene Expression Omnibus (GEO) database and the Cancer Genome Atlas (TCGA) database. The differentially expressed genes (DEGs) were intersected with ferroptosis-related gene set downloaded from FerrDb database, and 93 abnormally expressed ferroptosis-related genes were obtained. Then, these genes were analyzed for functional enrichment. Univariate Cox regression and multivariate Cox regression analyses were performed to establish prognostic model based on ferroptosis-related genes. In the process of exploring the correlation between prognostic genes and immune infiltration, we found that these genes were closely related to B cells, CD8+ T cells, CD4+ T cells, macrophages and other cells in CRC. In addition, we found a large proportion of plasma cells and macrophages in TCGA-COADREAD. Finally, a prognostic nomogram of ferroptosis-related genes was established, including age, sex, grade and other predicted values. To summary, we established a prognostic model of colorectal cancer (CRC) based on ferroptosis-related genes and further explored the relationship between these genes with immune microenvironment.