The purpose of the study was to investigate the effects of the reduced dietary calcium (Ca) and phosphorus (P) level and supplementation of 25-hydroxycholecalciferol (25-OHD3) on the expression of vitamin D receptor (VDR) and antimicrobial peptides and gut microbiota of broiler chickens with/without Eimeria challenge. A total of 576 fourteen-day-old broiler chicks were randomly allocated according to a 2 × 2 × 2 factorial design with main effects including Eimeria challenging (125,000 Eimeria acervulina, 25,000 Eimeria maxima, and 25,000 Eimeria tenella), dietary Ca and P levels (0.84% Ca and 0.42% available P or 0.64% Ca and 0.22% available P), and supplementation of 25-OHD3 (3,000 IU/kg) of 6 replicates. Three-way ANOVA was performed, and the effects of 3 main factors and their interactions were investigated. The reduced dietary Ca and P level downregulated cathelicidins 3 (CATH3) in the upper jejunum in the Eimeria challenging condition (interaction; P < 0.05). The reduced dietary Ca and P level decreased the relative mRNA expression of jejunal avian beta defensin 5 (AvBD5) in the Eimeria challenging condition (interaction; P < 0.05). The reduced dietary Ca and P level tended to decrease the relative mRNA expression of jejunal AvBD9 in the Eimeria challenging condition (interaction; P = 0.051). The reduced dietary Ca and P level decreased observed features (alpha diversity parameter for richness) in the upper jejunal microbiota in the Eimeria challenging condition (interaction; P < 0.05). The supplementation of 25-OHD3 decreased the relative abundance of the phylum Bacteroidetes (P < 0.05) and increased the relative abundance of the family Ruminococcaceae (P < 0.05) in the cecal digesta. The supplementation of 25-OHD3 decreased the serum endotoxin level in the Eimeria challenging condition (interaction; P < 0.05). Therefore, the reduced dietary Ca and P level modulated the upper jejunal microbiota via modulating the expression of antimicrobial peptides, and the supplementation of 25-OHD3 favorably modulated the cecal microbiota in broiler chickens with/without Eimeria challenge.