Methods for regioselective N-methylation and -alkylation of unsaturated heterocycles with “off the shelf” reagents are highly sought-after. This reaction could drastically simplify synthesis of privileged bioactive molecules. Here we report engineered and natural methyltransferases for challenging N-(m)ethylation of heterocycles, including benzimidazoles, benzotriazoles, imidazoles and indazoles. The reactions are performed through a cyclic enzyme cascade that consists of