The significance of gut microbiota in regulating animal immune response to viral infection is increasingly recognized. However, how chronic bee paralysis virus (CBPV) exploits host immune to disturb microbiota for its proliferation remains elusive. Through histopathological examination, we discovered that the hindgut harbored the highest level of CBPV, and displayed visible signs of damages. The metagenomic analysis showed that a notable reduction in the levels of Snodgrassella alvi and Lactobacillus apis, and a significant increase in the abundance of the opportunistic pathogens such as Enterobacter hormaechei and Enterobacter cloacae following CBPV infection. Subsequent co-inoculation experiments showed that these opportunistic pathogens facilitated the CBPV proliferation, leading to accelerated mortality in bees and exacerbation of bloated abdomen symptoms after CBPV infection. The expression level of antimicrobial peptide (AMP) was found to be significantly up-regulated by over 1000 times in response to CBPV infection, as demonstrated by subsequent transcriptome and quantitative real-time PCR investigations. In particular, through correlation analysis and a bacteriostatic test revealed that the AMPs did not exhibit any inhibitory effect against the two opportunistic pathogens. However, they did demonstrate inhibitory activity against S. alvi and L. apis. Our findings provide different evidence that the virus infection may stimulate and utilize the host’s AMPs to eradicate probiotic species and facilitate the proliferation of opportunistic bacteria. This process weakens the intestinal barrier and ultimately resulting in the typical bloated abdomen.