MgtE is a Mg2+ channel conserved in organisms ranging from prokaryotes to eukaryotes, including humans, and plays an important role in Mg2+ homeostasis. The previously determined MgtE structures in the Mg2+-bound, closed state and structure-based functional analyses of MgtE revealed that the binding of Mg2+ ions to the MgtE cytoplasmic domain induces channel inactivation to maintain Mg2+ homeostasis. However, due to the lack of a structure of the MgtE channel, including its transmembrane domain in Mg2+-free conditions, the pore-opening mechanism of MgtE has remained unclear.Here, we determined the cryoelectron microscopy (cryo-EM) structure of the MgtE-Fab complex in the absence of Mg2+ ions. The Mg2+-free MgtE transmembrane domain structure and its comparison with the Mg2+-bound, closed-state structure, together with functional analyses, showed the Mg2+-dependent pore opening of MgtE on the cytoplasmic side and revealed the kink motions of the TM2 and TM5 helices at the glycine residues, which are important for channel activity. Overall, our work provides structure-based mechanistic insights into the channel gating of MgtE.