Cordyceps militaris extract (CME) contains many bioactive compounds, mainly cordycepin (CPN). This study aimed to investigate the possible mechanisms underlying the amelioration of LPS-induced acute liver injury in piglets by CME or CPN supplementation using multi-omics analysis. Twenty-four weaned piglets were randomly distributed into 4 groups (n = 6): the control and LPS groups were fed basal diets; the CPN + LPS (CPN-LPS) and CME + LPS (CME-LPS) groups were fed the basal diets supplemented with CME or CPN. The results showed that CPN or CME supplementation significantly decreased the C-reactive protein level (p < 0.05) and improved liver tissue pathology to prevent acute liver injury after LPS treatment. Compared with LPS, the transcriptomic analysis indicated that CPN supplementation significantly downregulated cell adhesion molecules, while CME supplementation significantly downregulated inflammatory mediator regulation of TRP channels, complement and coagulation cascades and cytokine-cytokine receptor interaction. The metabolomic results showed that CPN or CME supplementation significantly reduced disease biomarker of bicyclo-prostaglandin E2, and increased levels of deoxyinosine and 3-hydroxyanthranilic acid (p < 0.05). The combined transcriptome and metabolome helped identify two metabolites PC 34:2 and PC 36:0, which may be associated with the restoration of liver cell morphology. In conclusion, CPN and CME could attenuate LPS-induced acute liver injury by regulating immune-related genes and metabolites. This study elucidates the potential protective mechanism of CPN or CME supplementation against acute liver injury.