Magnesium (Mg2+) is the most prevalent divalent intracellular cation. As co-factor in many enzymatic reactions, Mg2+ is essential for protein synthesis, energy production, and DNA stability. Disturbances in intracellular Mg2+ concentrations, therefore, unequivocally result in delayed cell growth and metabolic defects. To maintain physiological Mg2+ levels, all organisms rely on balanced Mg2+ influx and efflux via Mg2+ channels and transporters. This review compares the structure and the function of prokaryotic Mg2+ transporters and their eukaryotic counterparts. In prokaryotes, cellular Mg2+ homeostasis is orchestrated via the CorA, MgtA/B, MgtE, and CorB/C Mg2+ transporters. For CorA, MgtE, and CorB/C, the motifs that form the selectivity pore are conserved during evolution. These findings suggest that CNNM proteins, the vertebrate orthologues of CorB/C, also have Mg2+ transport capacity. Whereas CorA and CorB/C proteins share the gross quaternary structure and functional properties with their respective orthologues, the MgtE channel only shares the selectivity pore with SLC41 Na+/Mg2+ transporters. In eukaryotes, TRPM6 and TRPM7 Mg2+ channels provide an additional Mg2+ transport mechanism, consisting of a fusion of channel with a kinase. The unique features these TRP channels allow the integration of hormonal, cellular, and transcriptional regulatory pathways that determine their Mg2+ transport capacity. Our review demonstrates that understanding the structure and function of prokaryotic magnesiotropic proteins aids in our basic understanding of Mg2+ transport.