Sepsis, a disease caused by severe infection, has a high mortality rate. At present, there is a lack of reliable algorithmic models for biomarker mining and diagnostic model construction for sepsis. Programmed cell death (PCD) has been shown to play a vital role in disease occurrence and progression, and different PCD-related genes have the potential to be targeted for the treatment of sepsis. In this paper, we analyzed PCD-related genes in sepsis. Implicated PCD processes include apoptosis, necroptosis, ferroptosis, pyroptosis, netotic cell death, entotic cell death, lysosome-dependent cell death, parthanatos, autophagy-dependent cell death, oxeiptosis, and alkaliptosis. We screened for diagnostic-related genes and constructed models for diagnosing sepsis using multiple machine-learning models. In addition, the immune landscape of sepsis was analyzed based on the diagnosis-related genes that were obtained. In this paper, 10 diagnosis-related genes were screened for using machine learning algorithms, and diagnostic models were constructed. The diagnostic model was validated in the internal and external test sets, and the Area Under Curve (AUC) reached 0.7951 in the internal test set and 0.9627 in the external test set. Furthermore, we verified the diagnostic gene via a qPCR experiment. The diagnostic-related genes and diagnostic genes obtained in this paper can be utilized as a reference for clinical sepsis diagnosis. The results of this study can act as a reference for the clinical diagnosis of sepsis and for target discovery for potential therapeutic drugs.