Synthetic linear antimicrobial peptides with cationic α-helical structures, such as BP100, have potent and specific activities against economically important plant pathogenic bacteria. They are also recognized as valuable therapeutics and preservatives. However, highly active BP100 derivatives are often phytotoxic when expressed at high levels as recombinant peptides in plants. Here we demonstrate that production of recombinant phytotoxic peptides in transgenic plants is possible by strictly limiting transgene expression to certain tissues and conditions, and specifically that minimization of this expression during transformation and regeneration of transgenic plants is essential to obtain viable plant biofactories. On the basis of whole-genome transcriptomic data available online, we identified the Os.hsp82 promoter that fulfilled this requirement and was highly induced in response to heat shock. Using this strategy, we generated transgenic rice lines producing moderate yields of severely phytotoxic BP100 derivatives on exposure to high temperature. In addition, a threshold for gene expression in selected tissues and stages was experimentally established, below which the corresponding promoters should be suitable for driving the expression of recombinant phytotoxic proteins in genetically modified plants. In view of the growing transcriptomics data available, this approach is of interest to assist promoter selection for specific purposes.