Caffeine (1,3,7–trimethylxanthine) is one of the most widely used plant secondary metabolites, primarily as a stimulant and an ingredient in drugs. In nature, caffeine is believed to function in chemical defense, acting as an antiherbivory and allelopathic agent, and therefore it might be employed to protect agriculturally important crop plants. In coffee plants, caffeine is synthesized from the precursor xanthosine in four steps, three N-methylations and removal of ribose. We had previously isolated genes encoding three distinct N-methyltransferases, and we demonstrated production of recombinant enzymes that yielded caffeine in in vitro reconstitution experiments. When these caffeine biosynthetic pathway genes were simultaneously expressed in tobacco plants (Nicotiana tabacum), caffeine was successfully produced up to 5 µg/g fresh weight in leaves. The leaves were unpalatable to tobacco cutworms (Spodoptera litura). This repellent action appeared to be more widely&amp;#9251;applicable to lepidopteran caterpillars as observed with small white (Pieris rapae) fed on Chinese cabbages that had been top-treated with caffeine. Our recent results suggest a novel approach to strengthen anti-herbivore traits by producing caffeine in crop plants.