Quercetin is a common plant flavonoid which is involved in herbivore-plant interactions. Mulberry silkworms (domestic silkworm, Bombyx mori, and wild silkworm, Bombyx mandarina) take up quercetin from mulberry leaves and accumulate the metabolites in the cocoon, thereby improving its protective properties. Here we identified a glycoside hydrolase, named glycoside hydrolase family 1 group G 5 (GH1G5), which is expressed in the midgut and is involved in quercetin metabolism in the domestic silkworm. Our results suggest that this enzyme mediates quercetin uptake by deglycosylating the three primary quercetin glycosides present in mulberry leaf: rutin, quercetin-3-O-malonylglucoside, and quercetin-3-O-glucoside. Despite being located in an unstable genomic region that has undergone frequent structural changes in the evolution of Lepidoptera, GH1G5 has retained its hydrolytic activity, suggesting quercetin uptake has adaptive significance for mulberry silkworms. GH1G5 is also important in breeding: defective mutations which result in discoloration of the cocoon and increased silk yield are homozygously conserved in 27 of the 32 Japanese white-cocoon domestic silkworm strains and 12 of the 30 Chinese ones we investigated.