Objective To investigate the protective effects and mechanisms of gambogic acid (GA) against lipopolysaccharide (LPS)-induced acute lung injury (ALI). Methods An in vivo ALI model was established in ICR mice by LPS administration, and an in vitro model was established in LPS-stimulated BEAS-2B human bronchial epithelial cells. Mice were divided into control, LPS, GA (low, medium, and high doses), and dexamethasone groups. BEAS-2B cells were stimulated with LPS alone or co-treated with GA (low, medium, or high dose) or dexamethasone. Lung histopathology was evaluated by hematoxylin-eosin staining and scored, and the lung index was measured. In vitro, cell viability was assessed by MTS assay, and morphological changes were observed by hematoxylin-eosin staining. Transcriptome sequencing combined with molecular docking was used to predict potential targets and pathways of GA. In cells and mice, Western blotting was used to detect tumor necrosis factor-α, interleukin (IL)-6, IL-1β, the expression of B-cell lymphoma-2 (Bcl-2) and Bcl-2-associated X protein (Bax), and the phosphorylation of mitogen-activated protein kinase (MAPK) pathway proteins [p38, extracellular signal-regulated kinase (ERK), c-Jun N-terminal kinase (JNK)]. Results Compared with the LPS group, the GA medium- and high-dose groups and the dexamethasone group showed reduced lung injury scores and lung index (P<0.05), and alleviated structural damage in BEAS-2B cells. In both models, these groups exhibited decreased expression of TNF-α, IL-6, and IL-1β relative to the LPS group (P<0.05). There was no significant difference in BEAS-2B cell viability among groups (P>0.05). Transcriptomic analysis suggested that GA may attenuate ALI by modulating the MAPK pathway. Molecular docking analysis indicated stable binding of GA to p38, JNK, and ERK. In both models, medium- and high-dose GA inhibited LPS-induced phosphorylation of p38, ERK, and JNK (P<0.05) and suppressed the LPS-induced increase in the Bax/Bcl-2 ratio (P<0.05). Conclusions GA attenuates LPS-induced ALI, possibly by inhibiting the MAPK pathway and exerting anti-inflammatory and anti-apoptotic effects.