Histamine N-methyltransferase belongs to methyltransferases, a superfamily of enzymes present in every life form, including archaeans.
These enzymes catalyze methylation, which is a chemical process that involves the addition of a methyl group to a molecule, which can affect its biological function.
To facilitate methylation, methyltransferases transfer a methyl group (-CH) from a  cosubstrate (donor) to a substrate molecule (acceptor), leading to the formation of a methylated molecule. Most methyltransferases use S-adenosyl--methionine (SAM-e) as a  donor, converting it into S-adenosyl--homocysteine (SAH). In various species, members of the methyltransferase superfamily of enzymes methylate a wide range of molecules, including small molecules, proteins, nucleic acids, and lipids. These enzymes are involved in numerous cellular processes such as signaling, protein repair, chromatin regulation, and gene regulation. More than 230 families of methyltransferases have been described in various species.
This specific protein, histamine N-methyltransferase, is found in vertebrates, including mammals, birds, reptiles, amphibians, and fishes, but not in invertebrates and plants.
The complementary DNA (cDNA) of Hnmt was initially cloned from a rat kidney and has since been cloned from human, mouse, and guinea pig sources. Human HNMT shares 55.37% similarity with that of zebrafish, 86.76% with that of mouse, 90.53% with that of dog, and 99.54% with that of chimpanzee. Moreover, expressed sequence tags from cow, pig, and gorilla, as well as genome survey sequences from pufferfish, also exhibit strong similarity to human HNMT, suggesting that it is a highly conserved protein among vertebrates. To understand the role of histamine N-methyltransferase in brain function, researchers have studied Hnmt-deficient (knockout) mice, that were genetically modified to have the Hnmt gene "knocked out", i.e., deactivated. Scientists discovered that disrupting the gene led to a significant rise in histamine levels in the mouse brain that highlighted the role of the gene in the brains histamine system and suggested that HNMT' genetic variations in humans could be linked to brain disorders.