Exosomes are attractive as nucleic-acid carriers because of their favourable pharmacokinetic and immunological properties and their ability to penetrate physiological barriers that are impermeable to synthetic drug-delivery vehicles. However, inserting exogenous nucleic acids, especially large messenger RNAs, into cell-secreted exosomes leads to low yields. Here we report a cellular-nanoporation method for the production of large quantities of exosomes containing therapeutic mRNAs and targeting peptides. We transfected various source cells with plasmid DNAs and stimulated the cells with a focal and transient electrical stimulus that promotes the release of exosomes carrying transcribed mRNAs and targeting peptides. Compared with bulk electroporation and other exosome-production strategies, cellular nanoporation produced up to 50-fold more exosomes and a more than 103-fold increase in exosomal mRNA transcripts, even from cells with low basal levels of exosome secretion. In orthotopic phosphatase and tensin homologue (PTEN)-deficient glioma mouse models, mRNA-containing exosomes restored tumour-suppressor function, enhanced inhibition of tumour growth and increased survival. Cellular nanoporation may enable the use of exosomes as a universal nucleic-acid carrier for applications requiring transcriptional manipulation.