The hepatitis B virus (HBV) has caused acute and chronic liver diseases in ~350 million infected people worldwide. Halofuginone (HF) is a plant alkaloid which has been demonstrated to play a crucial role in immune regulation. Our present study explored the function of HF in the immune response of HBV-infected Sprague Dawley (SD) rats. Plasmid containing pCDNA3.1-HBV1.3 was injected in SD rats for the construction of an acute HBV-infected animal model. Our data showed that HF reduced the high concentrations of serum hepatitis B e-antigen, hepatitis B surface antigen, and HBV DNA induced by HBV infection. HF also reduced the number of T helper (Th)17 cells and the expression of interleukin (IL)-17 compared with the pCDNA3.1-HBV1.3 group. Moreover, pro-inflammatory cytokine levels (IL-17, IL-23, interferon-γ, and IL-2) were downregulated and anti-inflammatory cytokine levels (IL-4 and IL-13) were upregulated by HF. Through further research we found that the expression of AMP-activated protein kinase (AMPK) and IKBA which suppressed NF-κB activation was increased while the expression of p-NF-κB P65 was decreased in pCDNA3.1-HBV1.3+HF group compared with pCDNA3.1-HBV1.3 group, indicating that HF may work through the activation of AMPK. Finally, our conjecture was further verified by using the AMPK inhibitor compound C, which counteracted the anti-inflammation effect of HF, resulting in the decreased expression of AMPK, IKBA and increased expression of p-NF-κB P65 and reduced number of Th17 cells. In our present study, HF was considered as an anti-inflammatory factor in acute HBV-infected SD rats and worked through AMPK-mediated NF-κB p65 inactivation. This study implicated HF as a potential therapeutic strategy for hepatitis B.