Involved in chlorophyll biosynthesis. Catalyzes the insertion of magnesium ion into protoporphyrin IX to yield Mg-protoporphyrin IX. The reaction takes place in two steps, with an ATP-dependent activation followed by an ATP-dependent chelation step. Possesses low affinity for ATP and may play a limited role in chlorophyll biosynthesis, and contributes to the assembly of the Mg-chelatase complex. 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 CHLI2. Porphyrin-containing compound metabolism; chlorophyll biosynthesis. The magnesium chelatase complex is a heterotrimer consisting of subunits CHLI, CHLD, AND CHLH. Expressed in leaves. No visible phenotype under normal growth conditions, but plants show slight decrease in chlorophyll content. Chli1 and chli2 double mutants are albino. Belongs to the Mg-chelatase subunits D/I family.