BackgroundSepsis is a complex condition involving multiorgan failure, resulting from the hosts’ deleterious systemic immune response to infection. It is characterized by high mortality, with limited effective detection and treatment options. Dysregulated endoplasmic reticulum (ER) stress is directly involved in the pathophysiology of immune-mediated diseases.MethodsClinical samples were obtained from Gene Expression Omnibus datasets (i.e., GSE65682, GSE54514, and GSE95233) to perform the differential analysis in this study. A weighted gene co-expression network analysis algorithm combining multiple machine learning algorithms was used to identify the diagnostic biomarkers for sepsis. Gene Ontology (GO) analysis, Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment, and the single-sample gene set enrichment analysis algorithm were used to analyze immune infiltration characteristics in sepsis. PCR analysis and western blotting were used to demonstrate the potential role ofTXNin sepsis.ResultsFour ERRGs, namely SET, LPIN1, TXN, and CD74, have been identified as characteristic diagnostic biomarkers for sepsis. Immune infiltration has been repeatedly proved to play a vital role both in sepsis and ER. Subsequently, the immune infiltration characteristics result indicated that the development of sepsis is mediated by immune-related function, as four diagnostic biomarkers were strongly associated with the immune infiltration landscape of sepsis. The biological experiments in vitro and vivo demonstrate TXN is emerging as crucial player in maintaining ER homeostasis in sepsis.ConclusionOur research identified novel potential biomarkers for sepsis diagnosis, which point toward a potential strategy for the diagnosis and treatment of sepsis.