In the present work, the effect of applying ternary Ni–P–B 4C composite coating from an electroless plating bath containing sulfate nickel, sodium hypophosphate and suspended B 4C particles, on the corrosion and wear resistance of an AZ91D, high aluminum cast magnesium alloy, was investigated. Regarding low corrosion resistance of magnesium alloys, chromium oxide plus HF (Hydro Fluoric Acid) pretreatment was applied to prepare the substrate for coating treatment in electroless bath. The pH value and temperature of the electroless bath were 9 and 82 °C, respectively. The coating was characterized for its micro structure, morphology, microhardness, wear and corrosion resistance. SEM (Scanning Electron Microscope) observation showed dense and coarse nodules in the ternary composite coating and the cross section of Ni–P–B 4C coating offered presence of well dispersed B 4C particles in the coating. The hardness of the Ni–P–B 4C composite coatings was around 1200 MPa, more than what can be obtained for Ni–P coatings (about 700 MPa). The wear test which was carried out by using pin on disc method, showed that ternary Ni–P–B 4C composite coating had a good wear resistance and more superior than Ni-P coating. The polarization test results for ternary Ni–P–B 4C composite coating exhibited good corrosion resistance properties in protecting the AZ91D magnesium alloy, but not better than Ni–P coating.