Cardiomyocytes injury caused by sepsis is a complication of common clinical critical illness and an important cause of high mortality in intensive care unit (ICU) patients. Therefore, lipopolysaccharide (LPS)-induced H9c2 cells were used to simulate the cardiomyocytes injury in vitro. The aim of this study was to investigate whether X-box binding protein 1 (XBP1) exacerbated LPS-induced cardiomyocytes injury by downregulating Xlinked inhibitor of apoptosis protein (XIAP) through activating the NF-κB signaling pathway. After transfection or LPS induction, XBP1 expression was detected by RT-qPCR analysis and Western blot analysis. The viability and apoptosis of H9c2 cells was detected by MTT assay and TUNEL assay. The protein expression related to apoptosis and NF-κB signaling pathway was detected by Western blot analysis. The inflammation and oxidative stress in H9c2 cells was evaluated by their commercial kits. Dual-luciferase reporter assay and chromatin immunoprecipitation (CHIP) assay were used to determine the combination of XBP1 and XIAP. As a result, LPS promoted the XBP1 expression in H9c2 cells. XBP1 was combined with XIAP. Inhibition of XBP1 increased viability, and inhibited apoptosis, inflammation, and oxidative stress of LPS-induced H9c2 cells by suppressing the NF-κB signaling pathway, which was partially reversed by the inhibition of XIAP. In conclusion, inhibition of XBP1 alleviates LPS-induced cardiomyocytes injury by upregulating XIAP through suppressing the NF-κB signaling pathway.