Abstract Background The gut microbiota–intestine–liver relationship is emerging as an important factor in multiple hepatic pathologies, but the hepatic sensors and effectors of microbial signals are not well defined. Results By comparing publicly available liver transcriptomics data from conventional vs. germ-free mice, we identified pregnane X receptor (PXR, NR1I2) transcriptional activity as strongly affected by the absence of gut microbes. Microbiota depletion using antibiotics in Pxr +/+ vs Pxr -/- C57BL/6J littermate mice followed by hepatic transcriptomics revealed that most microbiota-sensitive genes were PXR-dependent in the liver in males, but not in females. Pathway enrichment analysis suggested that microbiota–PXR interaction controlled fatty acid and xenobiotic metabolism. We confirmed that antibiotic treatment reduced liver triglyceride content and hampered xenobiotic metabolism in the liver from Pxr +/+ but not Pxr -/- male mice. Conclusions These findings identify PXR as a hepatic effector of microbiota-derived signals that regulate the host’s sexually dimorphic lipid and xenobiotic metabolisms in the liver. Thus, our results reveal a potential new mechanism for unexpected drug–drug or food–drug interactions. Video abstract