Both parasitoids and entomopathogenic fungi are becoming increasingly crucial for managing pest populations. Therefore, it is essential to carefully consider the potential impact of entomopathogenic fungi on parasitoids due to their widespread pathogenicity and the possible overlap between these biological control tools during field applications. However, despite their importance, little research has been conducted on the pathogenicity of entomopathogenic fungi on parasitoids. In our study, we aimed to address this knowledge gap by investigating the interaction between the well-known entomopathogenic fungus Beauveria bassiana, and the pupal endoparasitoid Pteromalus puparum. Our results demonstrated that the presence of B. bassiana significantly affected the survival rates of P. puparum under laboratory conditions. The pathogenicity of B. bassiana on P. puparum was dose- and time-dependent, as determined via through surface spraying or oral ingestion. RNA-Seq analysis revealed that the immune system plays a primary and crucial role in defending against B. bassiana. Notably, several upregulated differentially expressed genes (DEGs) involved in the Toll and IMD pathways, which are key components of the insect immune system, and antimicrobial peptides were rapidly induced during both the early and late stages of infection. In contrast, a majority of genes involved in the activation of prophenoloxidase and antioxidant mechanisms were downregulated. Additionally, we identified downregulated DEGs related to cuticle formation, olfactory mechanisms, and detoxification processes. In summary, our study provides valuable insights into the interactions between P. puparum and B. bassiana, shedding light on the changes in gene expression during fungal infection. These findings have significant implications for the development of more effective and sustainable strategies for pest management in agriculture.