Molecular methods are increasingly used to detect and identify parasites in their hosts. However, existing methods are generally not appropriate for studying complex host–parasite interactions because they require prior knowledge of species composition. DNA barcoding is a molecular method that allows identifying species using DNA sequences as an identification key. We used DNA amplification with primers common to aphid parasitoids and sequencing of the amplified fragment to detect and identify parasitoids in their hosts, without prior knowledge on the species potentially present. To implement this approach, we developed a method based on 16S rRNA mitochondrial gene and LWRh nuclear gene. First, we designed two primer pairs specific to Aphidiinae (Hymenoptera), the main group of aphid parasitoids. Second, we tested whether the amplified regions could correctly identify Aphidiinae species and found that 61 species were accurately identified of 75 tested. We then determined the ability of each primer pair to detect immature parasitoids inside their aphid host. Detection was earlier for 16S than for LWRh, with parasitoids detected, respectively, 24 and 48 h after egg injection. Finally, we applied this method to assess parasitism rate in field populations of several aphid species. The interest of this tool for analysing aphid-parasitoid food webs is discussed.