Xylanase exerts key roles in improving growth performance and intestinal health of broilers fed wheat-based diets. However, knowledge is limited regarding effects of xylanase supplementation on ileal microbiota in broilers. A total of 128 one-day-old broilers (initial BW 48.03 ± 0.33 g) were selected to investigate effects of xylanase (AT-xynA) on growth performance, ileal morphology, microbiota composition, immune response, antioxidant capacity, and endocrine peptide levels in broilers. Broilers were randomly allotted into two dietary treatments (n = 8), namely, a wheat-soybean basal diet and a basal diet with 4,000 U/kg AT-xynA (XY). On days 7, 14, 21, and 42, broilers were weighted and ileal tissues were sampled. Ileal digesta samples were collected for analyzing microbiota composition on days 21 and 42. The results showed that AT-xynA could improve average daily weight gain and average daily feed intake, and there were interactions between diet and age of broilers (p < 0.05). On days 21 and 42, xylanase supplementation decreased ileal microbiota α-diversity, and the relative abundance of potentially pathogenic microbiota, such as phylum Proteobacteria, family Moraxellaceae and Staphylococcaceae, genus Staphylococcus, Pseudomonas, Streptococcus, and Enterococcus, increased the abundance of Lactobacillus (p < 0.05). Moreover, the reduction in acetate concentration and abundance of short-chain fatty acid-producing bacteria was also observed in broilers from XY group (p < 0.05). AT-xynA increased ileal villus height, glucagon-like peptide-1, and insulin-like growth factor-1 concentrations and decreased interleukin-1β, interleukin-6, tumor necrosis factor-α, and malondialdehyde content in broilers, and these positive effects on intestinal health were greater in young broilers. In conclusion, xylanase supplementation to wheat-based diets could improve ileal intestinal morphology and immune function, and alleviate excess fermentation of bacteria, which may be related to changes of intestinal microbiota. In addition, the positive effects of xylanase on intestinal health were more pronounced in young broilers, thus contributing to subsequent improvement in growth performance of broilers.