Melatonin is present in many edible fruits; however, the presence of melatonin in apple has not previously been reported. In this study, the genes for melatonin synthetic enzymes including tryptophan decarboxylase, tryptamine 5-hydroxylase (T5H), arylalkylamine N-acetyltransferase, and N-acetylserotonin methyltransferase were identified in ‘Red Fuji’ apple. Each gene has several homologous genes. Sequence analysis shows that these genes have little homology with those of animals and they only have limited homology with known genes of rice melatonin synthetic enzymes. Multiple origins of melatonin synthetic genes during the evolution are expected. The expression of these genes is fully coordinated with melatonin production in apple development. Melatonin levels in apple exhibit an inverse relationship with the content of malondialdehyde, a product of lipid peroxidation. Two major melatonin synthetic peaks appeared on July 17 and on October 8 in both unbagged and bagged apple samples. At the periods mentioned above, apples experienced rapid expansion and increased respiration. These episodes significantly elevate reactive oxygen species production in the apple. Current data further confirmed that melatonin produced in apple was used to neutralize the toxic oxidants and protect the developing apple against oxidative stress.