Biological control mechanisms of plant diseases have been intensively studied. However, how plant pathogens respond to and resist or alleviate biocontrol agents remains largely unknown. in this study, a comparative transcriptome analysis was performed to elucidate how the pathogen of sclerotinia stem rot, Sclerotinia sclerotiorum, responds and resists to the biocontrol agent, Bacillus amyloliquefaciens. Results revealed that a total of 2,373 genes were differentially expressed in S. sclerotiorum samples treated with B. amyloliquefaciens fermentation broth (tS) when compared to control samples (CS). Among these genes, 2,017 were upregulated and 356 were downregulated. further analyses indicated that various genes related to fungal cell wall and cell membrane synthesis, antioxidants, and the autophagy pathway were significantly upregulated, including glucan synthesis, ergosterol biosynthesis pathway, fatty acid synthase, heme-binding peroxidase related to oxidative stress, glutathione S-transferase, ABc transporter, and autophagy-related genes. these results suggest that S. sclerotiorum recruits numerous genes to respond to or resist the biocontrol of B. amyloliquefaciens. thus, this study serves as a valuable resource regarding the mechanisms of fungal pathogen resistance to biocontrol agents.