Acute lung injury (ALI) which is featured by a strong pulmonary inflammation, is a major cause of morbidity and mortality in critically ill patients. Magnoflorine, a quaternary alkaloid isolated from Chinese herb Magnolia or Aristolochia, has been reported to have potent anti-inflammatory properties. However, the effect of magnoflorine on lipopolysaccharide (LPS)-induced ALI in mice has not been reported. The purpose of the present study is to investigate the anti-inflammatory effect of magnoflorine on LPS-induced ALI and elucidate its possible molecular mechanisms in RAW264.7 cells. The results of histopathological changes as well as the myeloperoxidase (MPO) activity indicated that magnoflorine significantly alleviated the lung injury induced by LPS. In addition, qPCR results showed that magnoflorine dose-dependently decreased the expression of pro-inflammatory cytokines TNF-α, IL-1β, and IL-6. Immunofluorescence assay also confirmed that the level of Toll-like receptor 4 (TLR4) induced by LPS was inhibited by magnoflorine treatment. Further experiments were performed using Western blotting to detect the expression of related proteins in the NF-κB and MAPK signaling pathways. The results showed that magnoflorine suppressed the levels of phosphorylated p65, IκBα, p38, ERK, and JNK. In conclusion, all data indicate that magnoflorine could protect against LPS-induced inflammation in ALI at least partially by inhibiting TLR4-mediated NF-κB and MAPK signaling pathways.