Lotus japonicus,like several other legumes, biosynthesizes the cyanogenic α–hydroxynitrile glucosides lotaustralin and linamarin. Upon tissue disruption these compounds are hydrolysed by a specific β–glucosidase, resulting in the release of hydrogen cyanide.Lotus japonicusalso produces the non-cyanogenic γ- and β–hydroxynitrile glucosides rhodiocyanoside A and D using a biosynthetic pathway that branches off from lotaustralin biosynthesis. We previously established that BGD2 is the only β–glucosidase responsible for cyanogenesis in leaves. Here we show that the paralogous BGD4 has the dominant physiological role in rhodiocyanoside degradation. Structural modelling, site-directed mutagenesis and activity assays establish that a glycine residue (G211) in the aglycone binding site of BGD2 is essential for its ability to hydrolyse the endogenous cyanogenic glucosides. The corresponding valine (V211) in BGD4 narrows the active site pocket, resulting in the exclusion of non-flat substrates such as lotaustralin and linamarin, but not of the more planar rhodiocyanosides. Rhodiocyanosides and theBGD4gene only occur inL. japonicusand a few closely related species associated with theLotus corniculatusclade within theLotusgenus. This suggests the evolutionary scenario that substrate specialization for rhodiocyanosides evolved from a promiscuous activity of a progenitor cyanogenic β–glucosidase, resembling BGD2, and required no more than a single amino acid substitution.