Many animals such as crustacean periodically undergo cyclic molt of the exoskeleton. During this process, amorphous calcium mineral phases are biologically stabilized by magnesium and are reserved for the subsequent rapid formation of new shell tissue. However, it is a mystery how living organisms can regulate the transition of the precursor phases precisely. We reveal that the shell mineralization from the magnesium stabilized precursors is associated with the presence of Asp-rich proteins. It is suggested that a cooperative effect of magnesium and Asp-rich compound can result into a crystallization switch in biomineralization. Our in vitro experiments confirm that magnesium increases the lifetime of amorphous calcium carbonate and calcium phosphate in solution so that the crystallization can be temporarily switched off. Although Asp monomer alone inhibits the crystallization of pure amorphous calcium minerals, it actually reduces the stability of the magnesium-stabilized precursors to switch on the transformation from the amorphous to crystallized phases. These modification effects on crystallization kinetics can be understood by an Asp-enhanced magnesium desolvation model. The interesting magnesium-Asp-based switch is a biologically inspired lesson from nature, which can be developed into an advanced strategy to control material fabrications.