N-methyltransferase that mediates the formation of anserine (beta-alanyl-N(Pi)-methyl-L-histidine) from carnosine. carnosine + S-adenosyl-L-methionine = anserine + H(+) + S-adenosyl-L-homocysteine Belongs to the carnosine N-methyltransferase family.