BackgroundEmerging studies have shown that pyroptosis plays a non-negligible role in the development and treatment of tumors. However, the mechanism of pyroptosis in colorectal cancer (CRC) remains still unclear. Therefore, this study investigated the role of pyroptosis in CRC.MethodsA pyroptosis-related risk model was developed using univariate Cox regression and LASSO Cox regression analyses. Based on this model, pyroptosis-related risk scores (PRS) of CRC samples with OS time > 0 from Gene Expression Omnibus (GEO) database and The Cancer Genome Atlas (TCGA) database were calculated. The abundance of immune cells in CRC tumor microenvironment (TME) was predicted by single-sample gene-set enrichment analysis (ssGSEA). Then, the responses to chemotherapy and immunotherapy were predicted by pRRophetic algorithm, the tumor immune dysfunction and exclusion (TIDE) and SubMap algorithms, respectively. Moreover, the Cancer Therapeutics Response Portal (CTRP) and PRISM Repurposing dataset (PRISM) were used to explore novel drug treatment strategies of CRC. Finally, we investigated pyroptosis-related genes in the level of single-cell and validated the expression levels of these genes between normal and CRC cell lines by RT-qPCR.ResultsSurvival analysis showed that CRC samples with low PRS had better overall survival (OS) and progression-free survival (PFS). CRC samples with low PRS had higher immune-related gene expression and immune cell infiltration than those with high PRS. Besides, CRC samples with low PRS were more likely to benefit from 5-fluorouracil based chemotherapy and anti-PD-1 immunotherapy. In novel drug prediction, some compounds such as C6-ceramide and noretynodrel, were inferred as potential drugs for CRC with different PRS. Single-cell analysis revealed pyroptosis-related genes were highly expressed in tumor cells. RT-qPCR also demonstrated different expression levels of these genes between normal and CRC cell lines.ConclusionsTaken together, this study provides a comprehensive investigation of the role of pyroptosis in CRC at the bulk RNA sequencing (RNA-seq) and single-cell RNA sequencing (scRNA-seq) levels, advances our understanding of CRC characteristics, and guides more effective treatment regimens.Graphical AbstractSupplementary InformationThe online version contains supplementary material available at 10.1186/s12935-023-02897-8.