Acute lung injury (ALI) is a severe health issue with significant morbidity and mortality. Artemisinin is used for the treatment of fever and malaria in clinical practice. Dihydroartemisinin (DHA), the major active metabolite of artemisinin, plays a role in anti‑organizational fibrosis and anti‑neuronal cell death. However, whether DHA can attenuate ALI remains unclear. The current study thus examined the effects of DHA on ALI and primary macrophages. The results revealed that DHA attenuated lipopolysaccharide (LPS)‑induced pulmonary pathological damage. DHA suppressed the LPS‑induced infiltration of inflammatory cells, the elevation of myeloperoxidase activity, oxidative stress and the production of pro‑inflammatory cytokines, including interleukin (IL)‑1β, tumor necrosis factor‑α, and IL‑6. Furthermore, DHA reduced the LPS‑induced inflammatory response by suppressing the degradation of I‑κB and the nuclear translocation of nuclear factor κ‑light‑chain‑enhancer of activated B cells (NF‑κB)/p65 in vivo and in vitro. DHA activated the nuclear factor‑erythroid 2 related factor 2 (Nrf2) pathway, which was suppressed by LPS treatment. The Nrf2 inhibitor, ML385, diminished the protective effects of DHA against LPS‑induced inflammation in macrophages. On the whole, the findings of this study demonstrate that DHA exerts therapeutic effects against LPS‑induced ALI by inhibiting the Nrf2‑mediated NF‑κB activation in macrophages. The present study also confirmed the therapeutic effects of DHA in mice with LPS‑induced ALI. Thus, these findings demonstrate that DHA exhibits anti‑inflammatory activities and may be a therapeutic candidate for the treatment of ALI.