The pathogenesis of acute lung injury (ALI) is characterized by lung inflammation and lung oxidative stress. The study was conducted in order to investigate the effect toll‐like receptor 4 (TLR4) and nuclear factor‐kappa B (NF‐κB) exhibited on oxidative stress in ALI. After the rats had been assigned into different groups, arterial blood, white blood cell (WBC), lung permeability index (LPI), wet/dry (W/D) ratio, TLR4 and NF‐κB expression and superoxide dismutase (SOD), myeloperoxidase (MPO), malondialdehyde (MDA), glutathione (GSH), and reactive oxygen species (ROS) were examined. Afterward, the correlation between the levels of TLR4 and NF‐κB was determined. Decreased levels of PaO2, SOD, MPO, and GSH accompanied by increased levels of PaCO2, WBC number, LPI and W/D ratio, MDA and ROS, as well as TLR4 and NF‐κB expressions in the ALI, ALI + NF‐κB inhibitor, and ALI + phosphate buffer saline groups were found. Inhibition of NF‐κB resulted in increased PaO2 and decreased PaCO2 levels, WBC number, and LPI and W/D ratio. Decreased expression of NF‐κB increased SOD, GSH, and MPO, but decreased MDA and ROS. We also found that NF‐κB inhibition resulted in the improvement of ALI in rats. TLR4 and NF‐κB expressions were negatively correlated with levels of SOD, MPO, and GSH, and positively correlated with MDA and ROS levels. In summary, our findings provided evidence that inhibition of the TLR4/NF‐κB signaling pathway decreases oxidative stress, thereby improving ALI. As a result, NF‐κB signaling pathway has shown potential as a therapeutic target in ALI therapy.