The heterogeneity of colorectal cancer (CRC) is the main cause of the disparity of drug sensitivity and the variability of prognosis. Pyroptosis is closely associated with the development and prognosis of various tumors, including CRC. Dividing CRC into distinct subgroups based on pyroptosis is a worthwhile topic for improving the precision treatment and prognosis prediction of CRC. We classified patients into two clusters using the consensus clustering based on the pyroptosis-related genes (PRGs). Next, the prognostic signature was developed with LASSO regression analysis using the screened genes from differentially expressed genes (DEGs) by univariate and multivariate Cox analyses. According to the pyroptosis-related score (PR score) calculated with the signature, patients belonged to two groups with distinct prognosis. Moreover, we assessed the immune profile to explore the relationship between the signature and immunological characteristics. Two single cell sequencing databases were adopted for further exploration of tumor immune microenvironment (TME). In addition, we applied our own cohort and Drugbank to explore the correlation of the signature and clinical therapies. We also studied the expression of key genes by immunohistochemistry. The signature performed well in predicting the prognosis of CRC as the high area under curve (AUC) value demonstrated. Patients with a higher PR score had poorer prognosis and higher expression of immune checkpoints but more abundant infiltration of immune cells. Combining with the indicator of therapeutic analysis, they might benefit more from immune checkpoint blockade (ICB) and neo-adjuvant chemoradiotherapy (nCRT). In conclusion, our study is based on genomics and transcriptomics to investigate the role of PRGs in CRC. We have established a prognostic signature and integrated single-cell data to study the relationship between the signature with the TME in CRC. Its clinical application in reliable prediction of prognosis and personalized treatment was validated by public and own sequencing cohort. It provided a new insight for the personalized treatment of CRC.