Converts Mg-protoporphyrin IX to Mg-protoporphyrin IX methylester using S-adenosyl-L-methionine as a cofactor. Involved in chloroplast-to-nucleus signaling by acting as a negative effector of nuclear photosynthetic gene expression. Mg-protoporphyrin IX + S-adenosyl-L-methionine = Mg-protoporphyrin IX 13-monomethyl ester + S-adenosyl-L-homocysteine Regulated by the folate status via an increased concentration of S-adenosyl-homocysteine (AdoHcy), a potent inhibitor of most AdoMet-dependent methyltransferases. Porphyrin-containing compound metabolism; chlorophyll biosynthesis. Up-regulated by light. Down-regulated by the herbicide R-imazethapyr. Lethal under normal growth conditions and stunted albino plants unable to produce seeds when grown in presence of sucrose. Belongs to the class I-like SAM-binding methyltransferase superfamily. Magnesium protoporphyrin O-methyltransferase family.