Catalyzes the N-methylation of nicotinamide using the universal methyl donor S-adenosyl-L-methionine to form N1-methylnicotinamide and S-adenosyl-L-homocysteine, a predominant nicotinamide/vitamin B3 clearance pathway (PubMed:21823666, PubMed:23455543, PubMed:8182091). Plays a central role in regulating cellular methylation potential, by consuming S-adenosyl-L-methionine and limiting its availability for other methyltransferases. Actively mediates genome-wide epigenetic and transcriptional changes through hypomethylation of repressive chromatin marks, such as H3K27me3 (PubMed:23455543, PubMed:26571212, PubMed:31043742). In a developmental context, contributes to low levels of the repressive histone marks that characterize pluripotent embryonic stem cell pre-implantation state (PubMed:26571212). Acts as a metabolic regulator primarily on white adipose tissue energy expenditure as well as hepatic gluconeogenesis and cholesterol biosynthesis. In white adipocytes, regulates polyamine flux by consuming S-adenosyl-L-methionine which provides for propylamine group in polyamine biosynthesis, whereas by consuming nicotinamide controls NAD(+) levels through the salvage pathway (By similarity). Via its product N1-methylnicotinamide regulates protein acetylation in hepatocytes, by repressing the ubiquitination and increasing the stability of SIRT1 deacetylase (By similarity). Can also N-methylate other pyridines structurally related to nicotinamide and play a role in xenobiotic detoxification (PubMed:30044909).