Ilex asprella, a valued plant traditionally used as food and medicine, is recognized for its effect on liver protection. Polysaccharides, as the key active components in Ilex asprella (IAP), its biological activities are still unexplored. Therefore, this study investigated the preventive effects of IAP on liver injury in vivo. H&E and TUNEL staining revealed IAP could ameliorate the histomorphology changes and liver apoptosis. For antioxidant ability, IAP preconditioning released D-GalN/LPS-induced oxidative stress via Nrf2/HO-1 signaling pathway in liver, as evidenced by increasing superoxide dismutase, total antioxidant capacity, glutathione peroxidase, and inhibiting the activation of Nrf2 and HO-1. Furthermore, IAP reduced the expression of IL-6, IL-1β and TNF-α, showing good anti-inflammatory effects. According to the results from western blot, the phosphorylation of TLR4, p65, IκB, p38, ERK, and JNK were effectively inhibited with IAP pre-treatment, indicating IAP can ameliorate the liver inflammation through TLR4/NF-κB and MAPK signaling pathway. 16S RNA sequencing revealed IAP re-regulated composition of gut microbiota, including inhibiting the harmful bacteria (Parasutterella and Erysipelatoclostridium) enrichment and restoring the probiotics (Lactobacillus, Dubosiella and Bacteroide). In conclusion, this study revealed IAP can improve liver injury by inhibiting liver oxidative stress, releasing inflammation and modulating the gut microbiota.