Abstract Background Acute liver injury (ALI) is an essential component of sepsis associated with poor outcomes. Octanoic acid (OA), a medium‐chain fatty acid, has a protective effect on sepsis‐induced organ damage, and autophagy is an adaptive response to sepsis. However, the underlying mechanism by which OA prevents ALI remains unknown. Therefore, we investigated whether OA‐rich enteral nutrition (EN) prevented lipopolysaccharide (LPS)‐induced ALI through the c‐Jun N‐terminal kinase (JNK)‐dependent autophagy. Methods Firstly, Sprague Dawley rats were randomly divided into four groups (sham, LPS, LPS + EN, and LPS + EN + OA) to detect the effect of OA‐rich EN on LPS‐induced ALI. Then, rats were randomly divided into five groups (sham, LPS, LPS + EN + OA, LPS + EN + OA + anisomycin (AN), and LPS + SP600125) to explore the mechanism by which OA‐rich EN prevented ALI. EN and OA‐rich EN were conducted through gastric tubes for 3 days. The liver protective effects were measured by liver histopathological changes, enzymes, inflammatory cytokines of serum and liver, the levels of autophagy, and JNK activity. Results OA‐rich EN inhibited JNK activity, up‐regulated autophagy and prevented LPS‐induced ALI. Inhibition of JNK activity conferred by SP promoted autophagy and prevented LPS‐induced ALI. Moreover, the protective effect of autophagy and inhibition of JNK activity conferred by OA‐rich EN on ALI was counteracted by AN. Conclusion OA‐rich EN prevented LPS‐induced ALI through JNK‐dependent autophagy. This result suggested that OA‐rich EN may be a therapeutic potential for ALI in patients with sepsis.