Astragaloside IV (AS-IV), derived from Astragalus membranaceus, exhibits significant anti-inflammatory properties in a variety of diseases. However, the specific anti-inflammatory mechanism of AS-IV depends on the different organs and doses. Its protective effect is still unknown in acute lung injury (ALI). This study aims to investigate the potential anti-inflammatory mechanism of AS-IV in ALI. Lipopolysaccharide (LPS) and adenosine triphosphate (ATP) were utilized to form pyroptosis models in MH-S and RAW264.7 cells. Mouse model of ALI was induced by intranasal LPS administration. In addition, the anti-pyroptosis effect of AS-IV was evaluated by using the C5aR1 agonists BM-213, the C5aR1 overexpression plasmids and C5aR1 siRNA. AS-IV significantly reduced pulmonary edema, improved histopathological injury, and decreased inflammatory factors. Meanwhile, AS-IV reduced ROS level and the amount of NLRP3 and GSDMD-N in vitro and in vivo. Inhibiting C5aR1 can effectively and significantly alleviate the pyroptosis of alveolar macrophages. Further studies found that BM-213 and C5aR1 overexpression plasmids partially reversed the anti-pyroptosis effect of AS-IV. The anti-pyroptosis effect of AS-IV was significantly inhibited when C5aR1 was knocked down. Our study demonstrate that AS-IV has anti-inflammatory protective effects on LPS-induced ALI, indicating that AS-IV may be a potential therapeutic agent for the treatment of ALI. This effect may be achieved by reducing the content of C5a, lowering the expression of C5aR1, and inhibiting cell pyroptosis.