Glucosinolates are plant secondary metabolites used in plant defense. For insects specialized on Brassicaceae, such as the diamondback moth, Plutella xylostella L. (Lepidoptera: Plutellidae), glucosinolates act as "fingerprints" that are essential in host plant recognition. Some plants in the genus Barbarea (Brassicaceae) contain, besides glucosinolates, saponins that act as feeding deterrents for P. xylostella larvae, preventing their survival on the plant. Two-choice oviposition tests were conducted to study the preference of P. xylostella among Barbarea leaves of different size within the same plant. P. xylostella laid more eggs per leaf area on younger leaves compared to older ones. Higher concentrations of glucosinolates and saponins were found in younger leaves than in older ones. In 4-week-old plants, saponins were present in true leaves, while cotyledons contained little or no saponins. When analyzing the whole foliage of the plant, the content of glucosinolates and saponins also varied significantly in comparisons among plants that were 4, 8, and 12 weeks old. In Barbarea plants and leaves of different ages, there was a positive correlation between glucosinolate and saponin levels. This research shows that, in Barbarea plants, ontogenetical changes in glucosinolate and saponin content affect both attraction and resistance to P. xylostella. Co-occurrence of a high content of glucosinolates and saponins in the Barbarea leaves that are most valuable for the plant, but are also the most attractive to P. xylostella, provides protection against this specialist herbivore, which oviposition behavior on Barbarea seems to be an evolutionary mistake.