Acute lung injury (ALI) is the injury of alveolar epithelial cells and capillary endothelial cells caused by various factors. Complement system and pyroptosis have been proved to be involved in ALI, and inhibition of C5a/C5a receptor (C5aR) could alleviate ALI. This study aimed to investigate whether C5a/C5aR inhibition could protect against LPS-induced ALI via mediating pyroptosis. Rats were assigned into four groups: Control, LPS, LPS+W-54011 1mg/kg, and LPS+W-54011 5mg/kg. Beas-2B cells pretreated with or without C5a and W-54011, alone and in combination, were challenged with LPS+ATP. Results unveiled that LPS caused lung tissue injury and inflammatory response, increased pyroptotic and apoptotic factors, along with elevated C5a concentration and C5aR expressions. However, W-54011 pretreatment alleviated lung damage and pulmonary edema, reduced inflammation and prevented cell pyroptosis. In vitro studies confirmed that LPS+ATP reduced cell viability, promoted cell death, generated inflammatory factors and promoted expressions of pyroptosis-related proteins, which could be prevented by W-54011 pretreatment while intensified by C5a pretreatment. The co-treatment of C5a and W-54011 could blunt the effects of C5a on LPS+ATP-induced cytotoxicity. In conclusion, inhibition of C5a/C5aR developed protective effects against LPS-induced ALI and the cytotoxicity of Beas-2B cells, and these effects may depend on blocking pyroptosis.