Sepsis‐induced acute lung injury (ALI) is a severe complication of sepsis. Karanjin, a natural flavonoid compound, has been proved to have anti‐inflammatory function, but its role in sepsis‐stimulated ALI is uncertain. Herein, the effect of karanjin on sepsis‐stimulated ALI was investigated. We built a mouse model of lipopolysaccharide (LPS)‐stimulated ALI. The histopathological morphology of lung tissues was scrutinized by hematoxylin–eosin (H&E) staining. The lung injury score and lung wet/dry weight ratio were detected. The myeloperoxidase (MPO) activity and malondialdehyde (MDA) content were scrutinized by commercial kits. Murine alveolar lung epithelial (MLE‐12) cells were treated with LPS to mimic a cellular model of ALI. The cell viability was scrutinized by the CCK‐8 assay. The contents of proinflammatory cytokines were scrutinized by qRT‐PCR and ELISA. The TLR4 and MyD88 contents were scrutinized by qRT‐PCR and western blotting. Results showed that karanjin alleviated LPS‐stimulated ALI in mice by inhibiting lung tissue lesions, edema, and oxidative stress. Moreover, karanjin inhibited LPS‐stimulated inflammation and TLR4 pathway activation in mice. However, treatment with GSK1795091, an agonist of TLR4, attenuated the effects of karanjin on LPS‐induced ALI. Furthermore, karanjin repressed LPS‐stimulated inflammatory response and TLR4 pathway activation in MLE‐12 cells. Overexpression of TLR4 attenuated karanjin effects on LPS‐stimulated inflammatory responses in MLE‐12 cells. In conclusion, karanjin repressed sepsis‐stimulated ALI in mice by suppressing the TLR4 pathway.