Catalysis of the reaction: S-adenosyl-L-methionine + histone = S-adenosyl-L-homocysteine + methyl-histone. Histone methylation generally occurs on either an arginine or a lysine residue.
histone N-methyltransferase activity