Aspergillus and Fusarium are two economically important genera of fungi. They cause significant yield losses and contamination of crops with mycotoxins. In this study we aimed to evaluate the impact of 2,4‐diacetylphloroglucinol (2,4‐DAPG) on Aspergillus and Fusarium fungi. It is hypothesized that two fungal genera, which have different ecological strategies, react differently to stress caused by a secondary metabolite produced by rhizosphere Pseudomonas species. We found that 2,4‐DAPG was able to reduce biofilm formation of Aspergillus and Fusarium, as reflected in biomass and its chemical composition. Furthermore, subinhibitory concentrations of 2,4‐DAPG increased the levels of ergosterol and polysaccharides (α‐ and β‐glucans, chitin) in the cell membrane and cell wall of Aspergillus, while decreasing them in Fusarium. 2,4‐DAPG altered the production of secondary metabolites, especially mycotoxins and extracellular proteases. The production of ochratoxin A was decreased in A. ochraceus, and T‐2 toxin and zearalenone, on the contrary, were increased in F. culmorum and F. sporotrichioides, respectively. Thus, using 2,4‐DAPG we demonstrated that the ecological role of fungi determines their reaction to antibiotic substances produced by the plant microbiome. Our data contributes to understanding the molecular mechanisms behind symbiotic relationships in natural communities, which are mediated by the biosynthesis of antibiotics.