N-methyltransferase (NMT)-catalyzed methylations are rarely reported at nonribosomal peptides (NRPs) terminuses. Here, we discovered a fungal NMT LcsG for the iterative terminal N-methyl formation of a family of NRPs, leucinostatins. Gene deletion suggested LcsG is essential to the methylation of leucinostatins. In vitro assay and HRESI-MS-MS analysis proved the methylation sites were the NH2, NHCH3 and N(CH3)2 in the C-terminal unit of various leucinostatins. Based on the protein structure predicted by artificial intelligence (AI), molecular docking, and site-directed mutagenesis, we proposed the catalytic mechanism of the LcsG-catalyzed reaction was an N atom coordinated by two negatively charged residues (Asp368, Asp395 for LcsG) towards the subsequent SN2 methylation. These findings not only provide an approach for enriching the variety of natural bioactivity of NPRs but also deepen the insight into the catalytic mechanism of N-methylation of NRPs.