Magnesium-chelatase is a three-component enzyme () that catalyses the insertion of Mg<sup>2+</sup> into protoporphyrin IX. This is the first unique step in the synthesis of chlorophyll and bacteriochlorophyll. As a result, it is thought that Mg-chelatase has an important role in channeling intermediates into the (bacterio)chlorophyll branch in response to conditions suitable for photosynthetic growth:
<div align=center><small>protoporphyrin IX + + ATP + ADP + phosphate + Mg-protoporphyrin IX + 2 </small></div>
The four substrates of this enzyme are ATP, protoporphyrin IX, Mg<sup>2+</sup>, and H<sub>2</sub>O; its four products are ADP, phosphate, Mg-protoporphyrin IX, and H<sup>+</sup>.
This enzyme belongs to the family of ligases, specifically those forming nitrogen-D-metal bonds in coordination complexes. The systematic name of this enzyme class is Mg-protoporphyrin IX magnesium-lyase. Other names in common use include protoporphyrin IX magnesium-chelatase, protoporphyrin IX Mg-chelatase, magnesium-protoporphyrin IX chelatase, magnesium-protoporphyrin chelatase, magnesium-chelatase, Mg-chelatase, and Mg-protoporphyrin IX magnesio-lyase. This enzyme is part of the biosynthetic pathway to chlorophylls.