Endotoxemia-related acute liver injury has a poor prognosis and high mortality, and macrophage polarization plays a central role in the pathological process. Pregnane X receptor (PXR) serves as a nuclear receptor and xenosensor, safeguarding the liver from toxic stimuli. However, the effect and underlying mechanism of PXR activation on endotoxemic liver injury remain largely unknown. Here, the expression of PXR is reported in human and murine macrophages, and PXR activation modified immunotypes of macrophages. Moreover, PXR activation significantly attenuated endotoxemic liver injury and promoted macrophage M2 polarization. Macrophage depletion by GdCl3 confirmed the essential of macrophages in the beneficial effects observed with PXR activation. The role of PXR in macrophages is further validated using AAV8-F4/80-Pxr shRNA-treated mice; the PXR-mediated hepatoprotection is impaired, and M2 polarization enhancement is blunted. Additionally, treatment with PXR agonists inhibited lipopolysaccharide (LPS)-induced M1 polarization and favored M2 polarization in BMDM, Raw264.7, and THP-1 cells. Further analyses revealed an interaction between PXR and p-STAT6 in vivo and in vitro. Moreover, blocking Pxr or Stat6 abolished the PXR-induced polarization shift. Collectively, macrophage PXR activation attenuated endotoxin-induced liver injury and regulated macrophage polarization through the STAT6 signaling pathway, which provided a potential therapeutic target for managing endotoxemic liver injury.