To fully understand the ecology and evolution of plant–herbivore interactions, information regarding the life history of both immature and adult insect stages is essential. However, most knowledge of plant–herbivore associations is derived from observations of adults. One reason for this bias is that species identification of immature stages is usually challenging. DNA barcodes can be used to identify immature stages to the species level. This technique compares short sequences of the appropriate DNA barcode loci [e.g. mitochondrial cytochrome c oxidase subunit I (COI) gene for insects] of an unidentified specimen with a known DNA barcode library. The accuracy of DNA-based identifications depends on the comprehensiveness of the DNA barcode library. We generated a comprehensive DNA barcode library for a community of rolled-leaf beetles (Coleoptera: Chrysomelidae) in a premontane tropical forest in Costa Rica. The DNA barcode COI accurately identified all beetle species included in the study. Using this DNA barcode library, we identified eggs and larvae of Cephaloleia histrionica Baly with 100% confidence. This new record of C. histrionica is unique in that this species completes its life cycle on a bromeliad, whereas most Cephaloleia species are associated with plants from the order Zingiberales. The life cycle, diet breadth, immature stages, and sexual dimorphism are described for C. histrionica. © 2013 The Linnean Society of London, Biological Journal of the Linnean Society, 2013, 110, 189–198.