The detailed functional mechanism of recoverin, which acts as a myristoyl switch at the rod outer-segment disk membrane, is elucidated by direct and replica-exchange molecular dynamics. In accord with NMR structural evidence and calcium binding essays, simulations point to the key role of enhanced calcium binding to the EF3 loop of the semi-open state of recoverin as compared to the closed state. This two- to four-order decrease in calcium dissociation constant stabilizes the semi-open state in response to the increase of cytosolic calcium concentration in the vicinity of recoverin. A second calcium ion then binds to the EF2 loop and, consequently, the structure of the protein changes from the semi-open to the open state. The latter has the myristoyl chain extruded to the cytosol, ready to act as a membrane anchor of recoverin.