BackgroundHepatocellular carcinoma (HCC) remains one of the most common malignant tumors with poor survival. Pyroptosis is a kind of programmed cell death that can regulate the proliferation, invasion, and metastasis of tumor cells. However, the expression levels of pyroptosis-related genes (PRGs) in HCC and their relationship with prognosis are still unclear.MethodsOur study identified 35 PRGs through bioinformatics analysis that were differentially expressed between tumor samples and nontumor samples. According to these differentially expressed genes, HCC patients could be divided into two groups, cluster 1 and cluster 2. The least absolute shrinkage and selection operator (LASSO) Cox regression method was performed to construct a 10-gene signature that classified HCC patients in the cancer genome atlas (TCGA) database into low-risk and high-risk groups.ResultsThe results showed that the survival rate of HCC patients in the low-risk group was significantly higher than that in the high-risk group (p < 0.001). The validation cohort, the Gene Expression Omnibus (GEO) cohort, was divided into two risk groups based on the median risk score calculated by the TCGA cohort. The overall survival (OS) of the low-risk group was significantly better than that of the high-risk group (p = 0.007). Univariate and multivariate Cox regression analyses revealed that the risk score was an independent factor in predicting OS in HCC patients. Gene Ontology and Kyoto Encyclopedia of Genes and Genomes analyses showed that immune-related high-risk groups were rich in genes and had reduced immune status.ConclusionsPRGs play a significant role in tumor immunity and have the potential capability to predict the prognosis of HCC patients.