BACKGROUNDNectar plants provide extra nourishment for parasitoids, which can utilize floral volatiles to locate nectar‐rich flowers. A promising strategy is to screen potential floral species based on the wasps' olfactory preferences for nectar sources, and to ensure their suitability for both natural enemies and targeted pests. Cotesia vestalis (Haliday) is a dominant parasitoid of the oligophagous pest Plutella xylostella, which poses a significant threat to cruciferous vegetables globally. However, the chemical cues in plant–parasitoid complexes mediating Cotesia vestalis to locate nectar food resources and the positive effect of nectar plants on the Cotesia vestalis population are poorly understood.RESULTSThe results showed that Fagopyrum esculentum was the most attractive plant that attracted Cotesia vestalis, not Plutella xylostella in 44 flowering plants from 19 families. 1,2‐Diethyl benzene and 1,4‐diethyl benzene, identified from the floral volatiles from F. esculentum in full bloom, were found to elicit dose‐dependent electrophysiological responses and attract Cotesia vestalis adults, demonstrating their potential as semiochemicals. Moreover, the age‐stage, two‐sex life table revealed that feeding on nectar food increased the efficacy of Cotesia vestalis adults against Plutella xylostella.CONCLUSIONIn summary, the findings provide insights into the chemical ecology of plant–parasitoid complexes and support the potential use of F. esculentum as insectary plants in habitat manipulation against Plutella xylostella by supplying natural nectar food for the Cotesia vestalis population. Our results suggest an attract and reward strategy based on an attractant for Cotesia vestalis to control Plutella xylostella, or the development of volatile‐based artificial food for Cotesia vestalis. © 2023 Society of Chemical Industry.