Magnesium ions (Mg2+) are divalent cations essential for various cellular functions. Mg2+ homeostasis is maintained through Mg2+ channels such as MgtE, a prokaryotic Mg2+ channel whose gating is regulated by intracellular Mg2+ levels. Our previous crystal structure of MgtE in the Mg2+-bound, closed state revealed the existence of seven crystallographically-independent Mg2+-binding sites, Mg1–Mg7. The role of Mg2+-binding to each site in channel closure remains unknown. Here, we investigated Mg2+-dependent changes in the structure and dynamics of MgtE using nuclear magnetic resonance spectroscopy. Mg2+-titration experiments, using wild-type and mutant forms of MgtE, revealed that the Mg2+ binding sites Mg1, Mg2, Mg3, and Mg6, exhibited cooperativity and a higher affinity for Mg2+, enabling the remaining Mg2+ binding sites, Mg4, Mg5, and Mg7, to play important roles in channel closure. This study revealed the role of each Mg2+-binding site in MgtE gating, underlying the mechanism of cellular Mg2+ homeostasis