An in situ method was designed to measure a continuous open circuit potential (OCP) curve of AZ31 magnesium alloy and to observe the morphology variation of Ni-P coating during the process of the electroless plating. The deposition mechanism of the electroless Ni-P plating on AZ31 Mg alloy was studied by OCP curve, scanning electron microscopy (SEM), and energy dispersion spectroscopy (EDS). The process of electroless Ni-P plating contains the coating formation stage and the coating growth stage. The formation stage includes three procedures, i.e., the nucleation and growth of Ni crystallites, the extension of the coating in two-dimensional (2D) direction and the coalescence of the coating along three-dimensional (3D) direction. SEM investigations demonstrate that the spherical nodules of the Ni-P coating are not only formed during the coating growth stage, but also generated in the initial deposition stage of electroless Ni-P plating. The variation of the coating rates at different deposition stages corresponds to the deposition mechanism of their respective deposition stage.