Pyroptosis and related gasdermin family proteins are important in tumorigenesis of colorectal cancer (CRC). However, the prognosis roles of pyroptosis-related genes (PRGs) and its relation to infiltrates of immune cell in the pathogenesis of CRC remain unclear. By using this investigation, we set up a prognosis gene pattern on the basis of 13 PRGs(AIM2, CASP1, CASP5, CASP6, CASP8, CASP9, ELANE, GPX4, GSDMD, NLRP7, NOD2, PJVK and PRKACA) for CRC patients. A comprehensive bioinformatics analysis was followed to be performed. With good AUC prediction value of ROC curves, the group with high hazard firstly had poor survival prognosis than the group with low hazard. Secondly, we found that PRGs were significantly related to inflammation-associated genes and immune-associated genes in CRC. Then we identified a correlation of PRGs with immune infiltrations in CRC. For instance, abundances of NK cells resting and neutrophils were more in the low hazard group than in the high hazard group. As a whole, this work indicated that PRGs served a critical function in generating heterogeneity of the tumor microenvironment (TME) in CRC. This prognosis PRGs model may give a starting point for early diagnosis and medication use of CRC.