Degradable metals have been suggested as biomaterials with revolutionary potential for bone-related therapies. Of these candidate metals, magnesium alloys appear to be particularly attractive candidates because of their non-toxicity and outstanding mechanical properties. Despite their having been widely studied as orthopedic implants for bone replacement/regeneration, their undesirably rapid corrosion rate under physiological conditions has limited their actual clinical application. This study reports the use of a novel biomimetic peptide coating for Mg alloys to improve the alloy corrosion resistance. A 3DSS biomimetic peptide is designed based on the highly acidic, bioactive bone and dentin extracellular matrix protein, phosphophoryn. Surface characterization techniques (scanning electron microscopy, energy dispersive X-ray spectroscopy and diffuse-reflectance infrared spectroscopy) confirmed the feasibility of coating the biomimetic 3DSS peptide onto Mg alloy AZ31B. The 3DSS peptide was also used as a template for calcium phosphate deposition on the surface of the alloy. The 3DSS biomimetic peptide coating presented a protective role of AZ31B in both hydrogen evolution and electrochemical corrosion tests.