Involved in chlorophyll biosynthesis. Catalyzes the insertion of magnesium ion into protoporphyrin IX to yield Mg-protoporphyrin IX. The magnesium-chelatase is a complex of three subunits, CHLI, CHLD and CHLH. The reaction takes place in two steps, with an ATP-dependent activation followed by an ATP-dependent chelation step (By similarity). ATP + H2O + Mg(2+) + protoporphyrin IX = ADP + 3 H(+) + Mg-protoporphyrin IX + phosphate Redox regulation; active in reducing conditions, inactive in oxidizing conditions. Thioredoxins f and m mediate the reversible reductive activation of oxidized CHLI (By similarity). Porphyrin-containing compound metabolism; chlorophyll biosynthesis. The magnesium chelatase complex is a heterotrimer consisting of subunits CHLI, CHLD, AND CHLH. Strongly expressed in young leaves and to a lesser extent in mature leaves. Belongs to the Mg-chelatase subunits D/I family.