In the present work, electroless deposition of quaternary Ni-W-P-B4C composite coatings on AZ91D magnesium alloy was investigated. The coatings were characterized to study their microstructure, crystallite size, morphology, microhardness and corrosion resistance and compared with Ni-P and Ni-P-B4C composite coatings, prepared with the same method. The hardness of the Ni-W-P-B4C composite coatings was around 1290 MPa which was more than that of the Ni-P and Ni-P-B4C coatings (about 700 and 1200 MPa, respectively). According to polarization test results, the Ni-W-P-B4C composite coating exhibits less and more corrosion rates with respect to the Ni-P-B4C and the Ni P coatings, respectively. X-ray diffraction (XRD) analysis results for the Ni-W-P-B4C coating showed that the Ni-W-P-B4C coating has a combination of amorphous and nanocrystalline structures. Also, Williamson Hall analysis on the X-ray patterns revealed that the Ni-W-P-B4C coating has an average crystallite size of 1.5 nm. (C) 2012 Elsevier Ltd. All rights reserved.