Plants usually produce defence metabolites in non-active forms to minimize the risk of harm to themselves and spatiotemporally activate these defence metabolites upon pathogen attack. This so-called two-component system plays a decisive role in the chemical defence of various plants. Here, we discovered that Panax notoginseng, a valuable medicinal plant, has evolved a two-component chemical defence system composed of a chloroplast-localized β-glucosidase, denominated PnGH1, and its substrates 20(S)-protopanaxadiol ginsenosides. The β-glucosidase and its substrates are spatially separated in cells under physiological conditions, and ginsenoside hydrolysis is therefore activated only upon chloroplast disruption, which is caused by the induced exoenzymes of pathogenic fungi upon exposure to plant leaves. This activation of PnGH1-mediated hydrolysis results in the production of a series of less-polar ginsenosides by selective hydrolysis of an outer glucose at the C-3 site, with a broader spectrum and more potent antifungal activity in vitro and in vivo than the precursor molecules. Furthermore, such β-glucosidase-mediated hydrolysis upon fungal infection was also found in the congeneric species P. quinquefolium and P. ginseng. Our findings reveal a two-component chemical defence system in Panax species and offer insights for developing botanical pesticides for disease management in Panax species.