Sepsis increases the risk of developing liver injury. Previous studies have demonstrated that thymoquinone (TQ) exhibits hepatoprotective properties in vivo as well as in vitro. The present study aimed to investigate the underlying mechanisms of the protective effects of TQ against liver injury in septic BALB/c mice. Male BALB/c mice (age, 8 weeks) were randomly divided into four groups, namely, the control, TQ (50 mg/kg/day) treatment, cecal ligation and puncture (CLP), and TQ + CLP groups. CLP was performed following gavage of TQ for 2 weeks. At 48 h post-CLP, the histopathological alterations in the liver tissue (LT) and plasma levels of serum alanine aminotransferase (ALT), aspartate aminotransferase (AST) and alkaline phosphatase (ALP) were assessed. The present study evaluated microtubule-associated protein light chain 3 (LC3), sequestosome-1 (p62) and beclin 1 protein expression by western blotting and immunostaining, as well as interleukin (IL)-6, IL-1β, IL-10, monocyte chemoattractant protein-1 (MCP-1) and tumor necrosis factor-α (TNF-α) mRNA expression by RT-qPCR. The results of the present study indicated that administration of TQ to mice reduced the histological alterations caused by CLP in LT. TQ inhibited the plasma levels of ALT, AST and ALP in the CLP group. TQ significantly inhibited the elevation of p62, IL-1β, IL-6, MCP-1 and TNF-α levels as well as increased the LC3, beclin 1 and IL-10 levels in LT. PI3K expression in the TQ + CLP group was significantly decreased compared with that in the CLP group. TQ treatment effectively modulated the expression levels of p62, LC3, beclin 1, PI3K and proinflammatory cytokines, and may be an important agent for the treatment of sepsis-induced liver injury.