The evolutionary arms-race between plants and insects has led to key adaptive innovations that drive diversification. Alkaloids are well-documented anti-herbivory compounds in plant chemical defenses, but how these specialized metabolites are allocated to cope with both biotic and abiotic stresses concomitantly is largely unknown. To examine how plants prioritize their metabolic resources responding to herbivory and cold, we integrated dietary toxicity bioassay in insects with co-expression analysis, hierarchical clustering, promoter assay, and protein-protein interaction in plants.Catharanthus roseus,a medicinal plant known for its insecticidal property against chewing herbivores, produces two terpenoid indole alkaloid monomers, vindoline and catharanthine. Individually, they exhibited negligible toxicity againstManduca sexta,a chewing herbivore; their condensed product, anhydrovinblastine, however, was highly toxic. Such unique insecticidal mode of action demonstrates that terpenoid indole alkaloid “timebomb” can only be activated when the two spatially isolated monomeric precursors are dimerized by herbivory. Without initial selection pressure and apparent fitness costs, this adaptive chemical defense against herbivory is innovative and sustainable.The biosynthesis of insecticidal terpenoid indole alkaloids is induced by herbivory but suppressed by cold. Here, we identified a transcription factor,Herbivore InducedVindoline-geneExpression (HIVE), that coordinates the production of terpenoid indole alkaloids in response to herbivory and cold stress. The HIVE-mediated transcriptional reprogramming allows this herbaceous perennial to allocate their metabolic resources for chemical defense at a normal temperature, when herbivory pressure is high, but switches to cold tolerance under a cooler temperature, when insect infestation is secondary.