ABSTRACT Objective The study will be to observe the effect of Sodium butyrate (NaB) on bone loss in lipopolysaccharide (LPS)-treated rats. Methods In the rat model, we observed that changes in the expression of oxidative stress regulators, inflammatory markers and target genes were measured by immunofluorescence and RT–PCR after treatment. Changes in viability and osteogenesis of MC3T3-E1, osteoclast differentiation in RAW264.7 cells in the presence of LPS were evaluated using CCK-8, ALP staining, RES staining, and TRAP staining. Results In vitro experiments have shown that LPS-induced inhibition of JC-1, SIRT1, GPX1 and SOD2 is associated with increased levels of inflammation and oxidative stress. In addition, NaB has been found to suppress oxidative stress, inflammation and Mito SOX, promote osteogenic differentiation, and inhibit osteoclast differentiation. In addition, NaB significantly promoted SITR1 expression, repaired impaired bone metabolism, and improved bone strength and bone mineral density. Conclusion Given all this experimental evidence, the results strongly suggest that NaB can restore osteogenic activity in the presence of LPS by reducing intracellular ROS, inhibiting osteoclast differentiation and reducing bone loss in LPS-treated rat models.