Melatonin is found in a wide variety of plant species. Several investigators have studied the physiological roles of melatonin in plants. However, its role is not well understood because of the limited information on its biosynthetic pathway. To clarify melatonin biosynthesis in plants, we isolated a cDNA-coded arylalkylamine N-acetyltransferase (AANAT), a possible limiting enzyme for melatonin biosynthesis, from Chlamydomonas reinhardtii (designated as CrAANAT). The predicted amino acid sequence of CrAANAT shares 39.0% homology to AANAT from Ostreococcus tauri and lacks cAMP-dependent protein kinase phosphorylation sites in the N- and C-terminal regions that are conserved in vertebrates. The enzyme activity of CrAANAT was confirmed by in vitro assay using Escherichia coli. Transgenic plants constitutively expressing the CrAANAT were produced using Micro-Tom, a model cultivar of tomato (Solanum lycopersicum L.). The transgenic Micro-Tom exhibited higher melatonin content compared with wild type, suggesting that melatonin was synthesized from serotonin via N-acetylserotonin in plants. Moreover, the melatonin-rich transgenic Micro-Tom can be used to elucidate the role of melatonin in plant development.