Herbicides have demonstrated their impact on insect fitness by affecting their associated microbiota or altering the virulence of entomopathogenic fungi toward insects. However, limited research has explored the implications of herbicide stress on the intricate tripartite interaction among insects, associated bacterial communities, and entomopathogens. In this study, we initially demonstrated that associated bacteria confer a leaf beetle, Plagiodera versicolora, with the capability to resist the entomopathogenic fungus Aspergillus nomius infection, a capability sustained even under herbicide glyphosate stress. Further analysis of the associated microbiota revealed a significant alteration in abundance and composition due to glyphosate treatment. The dominant bacterium, post A. nomius infection or following a combination of glyphosate treatments, exhibited strong suppressive effects on fungal growth. Additionally, glyphosate markedly inhibited the pathogenic associated bacterium Pseudomonas though it inhibited P. versicolora's immunity, ultimately enhancing the beetle's tolerance to A. nomius. In summary, our findings suggest that the leaf beetle's associated microbiota bestow an augmented resilience against the dual stressors of both the entomopathogen and glyphosate. These results provide insight into the effects of herbicide residues on interactions among insects, associated bacteria, and entomopathogenic fungi, holding significant implications for pest control and ecosystem assessment.