The gut microbiome plays an essential role in the immune system of invertebrates and vertebrates. Pre and pro-biotics could enhance the shrimp immune system by increasing the phenoloxidase (PO), prophenoloxidase (ProPO), and superoxide dismutase activities. During viral infection, the host immune system alteration could influence the gut microbiome composition and probably lead to other pathogenic infections. Since the JAK/STAT pathway is involved in white spot syndrome virus (WSSV) infection, we investigated the intestine immune genes of STAT-silenced shrimp. During WSSV infection, expression levels of PmVago1, PmDoral, and PmSpätzle in PmSTAT-silenced shrimp were higher than normal. In addition, the transcription levels of antimicrobial peptides, including crustinPm1, crustinPm7, and PmPEN3, were higher in WSSV-challenged PmSTAT-silenced shrimp than the WSSV-infected normal shrimp. Meanwhile, PmSTAT silencing suppressed PmProPO1, PmProPO2, and PmPPAE1 expressions during WSSV infection. The microbiota from four shrimp tested groups (control group, WSSV-infected, PmSTAT-silenced, and PmSTAT-silenced infected by WSSV) was significantly different, with decreasing richness and diversity due to WSSV infection. The relative abundance of Bacteroidetes, Actinobacteria, and Planctomycetes was reduced in WSSV-challenged shrimp. However, at the species level, P. damselae, a pathogen to human and marine animals, significantly increased in WSSV-challenged shrimp. In constrast, Shewanella algae, a shrimp probiotic, was decreased in WSSV groups. In addition, the microbiota structure between control and PmSTAT-silenced shrimp was significantly different, suggesting the importance of STAT to maintain the homeostasis interaction with the microbiota.