The dysregulation of cell death is closely associated with the development, progression, tumor microenvironment (TME), and prognosis of cancer. However, there is no study that comprehensively explores the prognostic and immunological role of cell death in human pan-cancer. We used published human pan-cancer RNA-sequencing and clinical data to explore the prognostic and immunological roles of programmed cell death, which included apoptosis, autophagy, ferroptosis, necroptosis, and pyroptosis. A total of 9925 patients were included for bioinformatic analysis, with 6949 and 2976 patients in the training cohort and validation cohort, respectively. Five-hundred and ninety-nine genes were defined as programmed-cell-death-related genes. In the training cohort, 75 genes were identified to define PAGscore by survival analysis. According to the median value of PAGscore, patients were divided into high- and low-risk groups, and subsequent analyses demonstrated that the high-risk group had a higher level of genomic mutation frequency, hypoxia score, immuneScore, expression of immune genes, activity of malignant signaling pathways, and cancer immunity cycle. Most anti-tumor and pro-tumor components of the TME showed greater activity in high-risk patients. Scores of malignant cell properties were also higher in high-risk patients. These findings were confirmed in the validation cohort and external cohort. Our study constructed a reliable gene signature to distinguish prognosis-favorable and prognosis-unfavorable patients and demonstrated that cell death was significantly associated with cancer prognosis and the TME.