In this article, Ni-B composite electrodeposition was prepared by nanodiamond and Y2O3 nanoparticles. Due to the synergistic strengthening effect of the two reinforcing phase particles on the Ni-B composite coating, the wear and corrosion resistance of the Ni-B/diamond-Y2O3 composite coating is significantly better than that of the single reinforcing material composite coating. In addition, the effect of electrodeposition pulse frequency on Ni-B/diamond-Y2O3 composite coating was studied in detail, and its characterization and performance tests were carried out. The results show that the Ni-B/diamond-Y2O3 nanocomposite coatings prepared with a pulse frequency of 100 Hz have finer grains and no agglomeration. The Ni-B/diamond-Y2O3 nanocomposite coating has the highest impedance under the pulse frequency of 100 Hz, the corrosion inhibition rate is 98.70%, and it has good corrosion resistance. At the same time, in the mechanical property test, the average microhardness is as high as 661.90 HV, the average friction coefficient is only 0.206, and the wear resistance is excellent. In conclusion, the Ni-B/diamond-Y2O3 nanocomposite coatings prepared under 100 Hz pulse have excellent wear and corrosion resistance.