Guanylyl cyclase-activating protein 1 (GCAP-1) is an EF-hand protein that activates retinal guanylyl cyclase (RetGC) in photoreceptors at low free Ca2+ in the light and inhibits it in the dark when Ca2+ concentrations rise. We present the first direct evidence that Mg2+-bound form of GCAP-1, not its cation-free form, is the true activator of RetGC-1 under physiological conditions. Of four EF-hand structures in GCAP-1, three bound Ca2+ ions and could exchange Ca2+ for Mg2+. At concentrations of free Ca2+ and Mg2+ typical for the light-adapted photoreceptors, all three metal-binding EF-hands were predominantly occupied by Mg2, and the presence of bound Mg2+ in GCAP-1 was essential for its ability to stimulate RetGC-1. In the Mg2+-bound form of GCAP-1 all three Trp residues became more exposed to the polar environment compared with its apo form. The replacement of Mg2+ by Ca2+ in the EF-hands 2 and 3 further exposed Trp-21 to the solution in a non-metal-binding EF-hand domain 1 that interacts with RetGC. Contrary to that, replacement of Mg2+ by Ca2+ in the EF-hand 4 moved Trp-94 in the entering alpha-helix of the EF-hand 3 back to the non-polar environment. Our results demonstrate that Mg2+ regulates GCAP-1 not only by adjusting its Ca2+ sensitivity to the physiological conditions in photoreceptors but also by creating the conformation required for RetGC stimulation.