This study evaluated the effects of berberine on growth performance, immunity, haematological parameters, antioxidant capacity, and the expression of immune response‐related genes in lipopolysaccharide (LPS)‐challenged broilers. We assigned 120 one‐day‐old male broilers (Ross 308) to two treatment groups; each group included two subgroups, each of which included six replicates of five birds per replicate. The experiment used a 2 × 2 factorial arrangement with berberine treatment (0 or 60 mg/kg dietary) and challenge status [injection of saline (9 g/L w/v) or LPS (1.5 mg/kg body weight)] as the main factors. On days 14, 16, 18 and 20, broilers were intraperitoneally injected with LPS or physiological saline. Blood and liver samples were collected on day 21. Dietary berberine supplementation significantly alleviated the compromised average daily gain and average daily feed intake (p < 0.05) caused by LPS. The LPS challenge led to increased lymphocyte and white blood cell (WBC) counts, malondialdehyde (serum and liver) content, and immunoglobulin G and M, tumour necrosis factor‐α (TNF‐α) and interleukin‐1β (IL‐1β) expression (p < 0.05) and significantly reduced serum total superoxide dismutase (T‐SOD) activity (p < 0.05). Dietary berberine significantly mitigated the LPS‐induced decreases in the mRNA expression of nuclear factor‐kappa B (NF‐κB), TNF‐α, IL‐1β, inducible nitrite synthase and cyclooxygenase‐2 (p < 0.05) in the liver. In conclusion, berberine supplementation has a positive effect on LPS challenge, which may be related to the increase in antioxidant enzyme activity and inhibition of both NF‐κB signalling and the expression of inflammatory mediators.