The metazoan gut lumen harbors numerous microbial communities. Tolerance for high bacterial counts and maintenance of microbiota homeostasis remain insufficiently studied. In this study, we identified a novel dual oxidase (MjDUOX2) involved in reactive oxygen species (ROS) production in the kuruma shrimp Marsupenaeus japonicus. MjDUOX2 is a transmembrane protein with an N-signal peptide region (19 aa) and a peroxidase homology domain (PHD, 554 aa) in the extracellular region; seven transmembrane regions; and three EF (calcium-binding region) domains (110 aa), a FAD-binding domain (104 aa), and a NAD-binding domain (156 aa) in the intracellular region. The novel MjDUOX2 exhibits a relatively low similarity (26.84% identity) to a previously reported DUOX in the shrimp (designated as MjDUOX1). The mRNA of MjDUOXs was widely distributed in the hemocytes, heart, hepatopancreas, gills, stomach, and intestine. Oral infection of the shrimp with pathogenic bacteria upregulated the mRNA expression of MjDUOXs and increased the ROS level in the intestine. However, High ROS level could inhibit the expression of MjDUOXs in shrimp after Vibrio anguillarum infection. Knockdown of MjDUOXs by RNA interference (RNAi) decreased the ROS level, increased the bacterial count in the intestine, and decreased the survival rate of the MjDUOX-RNAi shrimp infected with V. anguillarum. These results suggest that MjDUOXs play an important role for microbiota homeostasis in intestine of shrimp.