The gut microbiota is essential for the growth and development of insects, and the intestinal immune system plays a critical role in regulating the homeostasis of intestinal microorganisms and their interactions with pathogenic bacteria. Infection withBacillus thuringiensis(Bt) can disrupt the gut microbiota of insects, but the regulatory factors governing the interaction between Bt and gut bacteria are not well understood. Uracil secreted by exogenous pathogenic bacteria can activate DUOX-mediated reactive oxygen species (ROS) production, which helps maintain intestinal microbial homeostasis and immune balance. To elucidate the regulatory genes involved in the interaction between Bt and gut microbiota, we investigate the effects of uracil derived from Bt on gut microbiota, and host immunity using a uracil deficient Bt strain (Bt GS57△pyrE) obtained by homologous recombination. We analyze the biological characteristics of the uracil deficient strain and found that the deletion of uracil in Bt GS57 strain changed the diversity of gut bacteria inSpodoptera exigua, as investigated using Illumina HiSeq sequencing. Furthermore, qRT-PCR analysis showed that compared with Bt GS57 (control), the expression of the SeDuox gene and the level of ROS were significantly decreased after feeding with Bt GS57△pyrE. Adding uracil to Bt GS57△pyrErestored the expression level of DUOX and ROS to a higher level. Additionally, we observed thatPGRP-SA,attacin, defensinandceropingenes were significant different in the midgut ofS. exiguainfected by Bt GS57 and Bt GS57△pyrE, with a trend of increasing first and then decreasing. These results suggest that uracil regulates and activates the DUOX-ROS system, affects the expression of antimicrobial peptide genes, and disturb intestinal microbial homeostasis. We preliminarily speculate that uracil is a key factor in the interaction between Bt and gut microbiota, and these findings provide a theoretical basis for clarifying the interaction between Bt, host, and intestinal microorganisms, as well as for gaining new insights into the insecticidal mechanism ofB. thuringiensisin insects.