Opuntia ficus-indica has always interacted with many phytophagous insects; two of them are Dactylopius coccus and D. opuntiae. Fine cochineal (D. coccus) is produced to extract carminic acid, and D. opuntiae, or wild cochineal, is an invasive pest of O. ficus-indica in more than 20 countries around the world. Despite the economic and environmental relevance of this cactus, D. opuntiae, and D. coccus, there are few studies that have explored volatile organic compounds (VOCs) derived from the plant–insect interaction. The aim of this work was to determine the VOCs produced by D. coccus and D. opuntiae and to identify different VOCs in cladodes infested by each Dactylopius species. The VOCs (essential oils) were obtained by hydrodistillation and identified by GC-MS. A total of 66 VOCs from both Dactylopius species were identified, and 125 from the Esmeralda and Rojo Pelón cultivars infested by D. coccus and D. opuntiae, respectively, were determined. Differential VOC production due to infestation by each Dactylopius species was also found. Some changes in methyl salicylate, terpenes such as linalool, or the alcohol p-vinylguaiacol were related to Dactylopius feeding on the cladodes of their respective cultivars. Changes in these VOCs and their probable role in plant defense mechanisms should receive more attention because this knowledge could improve D. coccus rearing or its inclusion in breeding programs for D. opuntiae control in regions where it is a key pest of O. ficus-indica.