Magnesium is an important cofactor for many biological processes, such as protein synthesis, nucleic acid stability, or neuromuscular excitability. Extracellular magnesium concentration is tightly regulated by the extent of intestinal absorption and renal excretion. Despite the critical role of magnesium handling, the exact mechanisms mediating transepithelial transport remained obscure. In the past few years, the genetic disclosure of inborn errors of magnesium handling revealed several new proteins along with already known molecules unexpectedly involved in renal epithelial magnesium transport, e.g., paracellin-1, a key player in paracellular magnesium and calcium reabsorption in the thick ascending limb or the gamma-subunit of the Na(+)-K(+)-ATPase in the distal convoluted tubule. In this review, we focus on TRPM6, an ion channel of the "transient receptor potential (TRP) gene family, which, when mutated, causes a combined defect of intestinal magnesium absorption and renal magnesium conservation as observed in primary hypomagnesemia with secondary hypocalcemia.