The present study was carried out to determine whether N-acetylcysteine (NAC) could modulate liver injury in a lipopolysaccharide (LPS)-challenged piglet model. For this purpose, eighteen piglets were randomly assigned to the control, LPS or NAC group. Piglets in the control and LPS groups were fed a basal diet, whereas those in the NAC group were fed the basal diet supplemented with 500 mg/kg NAC. On days 10, 13 and 20 of the trial, the LPS- and NAC-treated piglets were intraperitoneally administered LPS (100 μg/kg body weight), while the control group was administered the same volume of saline. On day 20 of the trial, blood samples were obtained 3 h after LPS or saline injection. On day 21, the piglets were killed to collect liver samples. Dietary NAC supplementation attenuated LPS-induced liver histomorphological abnormalities. Compared with the control group, in the LPS-challenged piglets, the activities of alanine aminotransferase and aspartate aminotransferase and the concentrations of H2O2, TNF-α, IL-6 and PGE2 were dramatically increased in the plasma and the activity of superoxide dismutase in the plasma and that of glutathione peroxidase in the liver were significantly decreased. The LPS challenge also increased the concentration of AMP and the ratio of AMP:ATP, but decreased adenylate energy charges and the levels of ATP and ADP. These adverse effects of the LPS challenge were ameliorated by NAC supplementation. Moreover, NAC inhibited the LPS-induced increases in the abundance of liver heat shock protein 70 and NF-κB proteins. In conclusion, these results suggest that dietary NAC supplementation alleviates LPS-induced liver injury by reducing the secretion of pro-inflammatory cytokines, increasing the antioxidative capacity and improving energy metabolism.