Methyltransferase able to methylate free cob(I)alamin in vitro, using glycine betaine as the methyl donor, yealding methylcobalamin (methylCbl) and dimethylglycine. In vivo, probably carries out the methylation of a corrinoid protein, likely the adjacently encoded DSY3155, with glycine betaine, to then supply methyl groups to tetrahydrofolate (THF) for ultimate conversion to carbon dioxide; oxidation of the methyl group would also provide reducing equivalents for anaerobic respiration. Thus, may function in the pathway that allows anaerobic methylotrophic growth of D.hafniense using glycine betaine. Cannot use quaternary amines such as carnitine and choline as substrates, nor tertiary amines such as dimethylglycine or trimethylamine. Highly up-regulated during growth on glycine betaine. In contrast to a small clade of this large protein family whose members have trimethylamine:corrinoid methyltransferase activity and have a genetically encoded pyrrolysine residue essential for catalysis, MtgB lacks pyrrolysine and uses a quaternary amine as substrate. Belongs to the trimethylamine methyltransferase family.