Given the multiple roles of associated microbiota in improving animal host fitness in a microbial environment, increasing numbers of researchers have focused on how the associated microbiota keeps stable under complex environmental factors, especially some biological ones. Recent studies show that associated microbiota interacts with pathogenic microbes. However, whether and how the interaction would influence microbiota stability is limitedly investigated. Based on the interaction among Delia antiqua, its associated microbiota, and one pathogen Beauveria bassiana, the associated microbiota's response to the pathogen was determined in this study. Besides, the underlying mechanism for the response was also preliminarily investigated. Results showed that B. bassiana neither infect D. antiqua larvae nor did it colonize inside the associated microbiota, and both the bacterial and fungal microbiota kept stable during the interaction. Further experiments showed that bacterial microbiota almost completely inhibited conidial germination and mycelial growth of B. bassiana during its invasion, while fungal microbiota did not inhibit conidial germination and mycelial growth of B. bassiana. According to the above results, individual dominant bacterial species were isolated, and their inhibition on conidial germination and mycelial growth of B. bassiana was reconfirmed. Thus, these results indicated that bacterial instead of fungal microbiota blocked B. bassiana conidia and stabilized the associated microbiota of D. antiqua larvae during B. bassiana invasion. The findings deepened the understanding of the role of associated microbiota–pathogen microbe interaction in maintaining microbiota stability. They may also contribute to the development of novel biological control agents and pest management strategies.