The new-type microbial rhodopsin, Haloquadratum walsbyi microbial rhodopsin (HwMR), was identified from the halophilic archaeon Haloquadratum walsbyi. Recent studies have found that this protein can sense the concentration of magnesium ions in the environment and exhibit characteristic changes in absorption spectra and photocycle kinetics. X-ray crystal structure analysis revealed that the wild-type HwMR has two magnesium ion-binding sites, D84 and T216, while the D84N mutant loses this property. Cell experiments have confirmed that HwMR is a light-driven inward transporter of magnesium ions, and researchers have proposed a sequential model for magnesium ion transport based on this finding. This discovery provides a new perspective for understanding the ion regulation mechanisms of microorganisms in extreme environments.