Bombyx mori nucleopolyhedrovirus (BmNPV) is a major pathogen threatening sericulture, yet the role of gut microbiota in strain-specific resistance remains poorly understood. This study compared three silkworm strains with high (Xinjiu, XJ), intermediate (An3, A3), and low (Zhenchixian, ZCX) resistance to BmNPV. Protein assays showed that the resistant XJ strain exhibited the lowest viral EGFP and VP39 expression and highest survival, whereas the susceptible ZCX strain displayed the opposite trend. Shotgun metagenomics revealed strain-specific microbial responses to infection. XJ and A3 maintained significantly higher alpha diversity and more dynamic beta diversity clustering than ZCX, with infection inducing increased microbial gene abundance and emergence of unique taxa in XJ. Taxonomic profiling showed XJ enriched in Firmicutes and beneficial fungal taxa such as Mucoromycota, Ascomycota, Basidiomycota, and Zoopagomycota, alongside reductions in Actinobacteria and Proteobacteria following infection. At finer resolution, resistant strains were enriched in beneficial bacterial classes (Bacilli, Alphaproteobacteria, Opitutae) and fungal classes (Agaricomycetes, Saccharomycetes), with cooperative co-occurrence networks linking these taxa and antagonizing pathogens. In contrast, ZCX was dominated by Gammaproteobacteria, Actinomycetia, and Hydrogenophilalia, consistent with dysbiosis and susceptibility. Functional analysis demonstrated pronounced metabolic reprogramming in resistant strains, especially XJ, with coordinated activation of carbohydrate, amino acid, nucleotide, and lipid metabolism, forming tightly integrated functional networks. Together, these findings reveal that silkworm resistance to BmNPV is associated with microbiome diversity, restructuring toward beneficial taxa, and synergistic metabolic pathways, offering new insights for probiotic-based antiviral strategies.