A protective Ni–Co alloy coating was successfully prepared on sintered neodymium–iron–boron (NdFeB) magnet via potentiodynamic electrodeposition in this paper. The microstructure and surface morphology analysis of Ni–Co alloy coating showed that the surface morphologies were quite compact and more uniform than that prepared by direct current (DC) electrodeposition; significantly, the chemical composition analysis indicated that the content of Co in the alloy coatings amounted to 33–34 wt-%. Potentiodynamic polarisation and long term immersion test results revealed that the Ni–Co alloy coating could supply excellent corrosion protection for NdFeB substrate in 3.5 wt-% NaCl solution. Overall, the Ni–Co alloy coating with higher Co content prepared by potentiodynamic electrodeposition exhibited better corrosion protection for sintered NdFeB magnet compared with that prepared by DC electrodeposition.