Phenylalkylamines, such as the plant compounds ephedrine and pseudoephedrine and the animal neurotransmitters dopamine and adrenaline, compose a large class of natural and synthetic molecules with important physiological functions and pharmaceutically valuable bioactivities. The final steps of ephedrine and pseudoephedrine biosynthesis in members of the plant genus involve-methylation of norephedrine and norpseudoephedrine, respectively. Here, using a plant transcriptome screen, we report the isolation and characterization of an -methyltransferase (NMT) from able to catalyze the formation of (pseudo)ephedrine and other naturally occurring phenylalkylamines, including -methylcathinone and-methyl(pseudo)ephedrine. Phenylalkylamine -methyltransferase (PaNMT) shares substantial amino acid sequence identity with enzymes of the NMT family involved in benzylisoquinoline alkaloid (BIA) metabolism in members of the higher plant order Ranunculales, which includes opium poppy (). PaNMT accepted a broad range of substrates with phenylalkylamine, tryptamine, β-carboline, tetrahydroisoquinoline, and BIA structural scaffolds, which is in contrast to the specificity for BIA substrates of NMT enzymes within the Ranunculales. PaNMT transcript levels were highest in young shoots of , which corresponded to the location of NMT activity yielding (pseudo)ephedrine,-methylcathinone, and -methyl(pseudo)ephedrine, and with accumulation of phenylalkylamines. Co-expression of recombinant genes encoding PaNMT and an ω-transaminase (PP2799) from in enabled the conversion of exogenous ()-phenylacetylcarbinol (PAC) and ()-PAC to ephedrine and pseudoephedrine, respectively. Our work further demonstrates the utility of plant biochemical genomics for the isolation of key enzymes that facilitate microbial engineering for the production of medicinally important metabolites.