Background Sepsis is a life-threatening disease causing millions of deaths every year. It has been reported that programmed cell death (PCD) plays a critical role in the development and progression of sepsis, which has the potential to be a diagnosis and prognosis indicator for patient with sepsis. Methods Fourteen PCD patterns were analyzed for model construction. Seven transcriptome datasets and a single cell sequencing dataset were collected from the Gene Expression Omnibus database. Results A total of 289 PCD-related differentially expressed genes were identified between sepsis patients and healthy individuals. The machine learning algorithm screened three PCD-related genes, NLRC4, TXN and S100A9, as potential biomarkers for sepsis. The area under curve of the diagnostic model reached 100.0% in the training set and 100.0%, 99.9%, 98.9%, 99.5% and 98.6% in five validation sets. Furthermore, we verified the diagnostic genes in sepsis patients from our center via qPCR experiment. Single cell sequencing analysis revealed that NLRC4, TXN and S100A9 were mainly expressed on myeloid/monocytes and dendritic cells. Immune infiltration analysis revealed that multiple immune cells involved in the development of sepsis. Correlation and gene set enrichment analysis (GSEA) analysis revealed that the three biomarkers were significantly associated with immune cells infiltration. Conclusions We developed and validated a diagnostic model for sepsis based on three PCD-related genes. Our study might provide potential peripheral blood diagnostic candidate biomarkers for patients with sepsis.