This study was conducted to investigate the effects of dietary lysozyme (LZ) on growth performance, intestinal morphology, immune function, antioxidant capacity, and gut microbiota in broiler chickens. A total of 360 one-day-old yellow-feathered broilers were randomly assigned to three dietary treatments: basal diet (CON) or supplemented with 250 mg/kg lysozyme (LZ250) or 500 mg/kg lysozyme (LZ500) for 56 days. Results showed that LZ, particularly LZ250, significantly enhanced the growth performance with the higher body weight (BW), and average daily weight gain (ADG), and the lower feed-to-gain ratio (F:G) (P < 0.05). Supplementation with LZ markedly enhanced the intestinal mucosal barrier by increasing the villus height and villus height-to-crypt depth ratio (VH/CD) (P < 0.05), and reducing the crypt depth in the ileum and jejunum (P < 0.05). Furthermore, LZ supplementation regulated the intestinal injury genes (Villin, MMP3, I-FABP) and promoted the expression of tight junction proteins (Occludin, Claudin-1) (P < 0.05). Serum immunoglobulins (IgA, IgM, IgY) were significantly increased by LZ (P < 0.05), while the serum inflammatory factors (IL-1β, IL-6, TNF-α) showed no significance (P > 0.05). In ileum mucosa, LZ500 significantly decreased TNF-α but increased IL-6 (P < 0.05). In addition, LZ activated the NLRP3 inflammasome via the NF-κB pathway by increasing TLR4, MYD88, IRAK4, NF-κB, NLRP3, and Caspase-1 levels. Moreover, LZ enhanced antioxidant capacity, as the evidenced by increasing superoxide dismutase (SOD) and decreasing malondialdehyde (MDA) (P < 0.05). Lysozyme increased the volatile fatty acid (VFA) levels, with LZ250 group showing significant increases in propionic and isobutyric acids and LZ500 group in isobutyric and isovaleric acids. 16S RNA sequencing showed LZ improved microbiota abundance and diversity by upregulating Romboutsia, Blautia, and Lactobacillus (P < 0.05) while decreasing Rikenellaceae (P < 0.05). In summary, dietary with lysozyme improved growth performance, gut barriers, antioxidant capacity, immune functions, and optimized the intestinal microbiota, providing its potential application in poultry production.