Catnip or catmint (Nepeta spp.) is a flowering plant in the mint family (Lamiaceae) famed for its ability to attract cats. This phenomenon is caused by the compound nepetalactone, a volatile iridoid that also repels insects. Iridoids are present in many Lamiaceae species but were lost in the ancestor of the Nepetoideae, the subfamily containing Nepeta. Using comparative genomics, ancestral sequence reconstructions, and phylogenetic analyses, we probed the re-emergence of iridoid biosynthesis in Nepeta. The results of these investigations revealed mechanisms for the loss and subsequent re-evolution of iridoid biosynthesis in the Nepeta lineage. We present evidence for a chronology of events that led to the formation of nepetalactone biosynthesis and its metabolic gene cluster. This study provides insights into the interplay between enzyme and genome evolution in the origins, loss, and re-emergence of plant chemical diversity.