Catalyzes the transfer of a methyl group onto N-acetylserotonin, producing melatonin (N-acetyl-5-methoxytryptamine). Does not show Acetylserotonin O-methyltransferase activity. Does not show Acetylserotonin O-methyltransferase activity. N-acetylserotonin + S-adenosyl-L-methionine = H(+) + melatonin + S-adenosyl-L-homocysteine Aromatic compound metabolism; melatonin biosynthesis; melatonin from serotonin: step 1/2. Homodimer. Expressed in the pineal gland (at protein level). In the retina, very low expression is found at the mRNA level (PubMed:7989373), and not at the protein level (PubMed:8574683). By all-trans-, 9-cis- and 13-cis-retinoic acid and by serum treatment, following starvation, in the retinoblastoma cell line Y79. The gene coding for this protein is located in the pseudoautosomal region 1 (PAR1) of X and Y chromosomes. Includes part of a LINE-1 element. Belongs to the class I-like SAM-binding methyltransferase superfamily. Cation-independent O-methyltransferase family. 5-hydroxyindole-O-methyltransferase entry