In this study, Mg–2 wt% Zn scaffolds were fabricated by the powder metallurgy method, and the effects of the porosity content on the microstructure, and the mechanical properties of the scaffolds were studied. Nanocomposite coatings were deposited by pulse electrodeposition (PED) method on Mg–2Zn scaffolds and studied using a scanning electron microscope (SEM), X-ray diffraction (XRD), energy-dispersion spectrometer (EDS), and Fourier transform infrared spectroscopy (FT-IR). The coatings morphologies showed that optimal coating was obtained at 40 V pulse voltages, 10 min coating time and nanohydroxyapatite(nHA)/chitosan (CS) ratio = 10. The pulse-peak current density (CD), the pulse duty cycles (DC), pH and temperature were considered 10 mA/cm2, 0.2,7 and 37 °C, respectively. In optimal coating, Ca/P atomic ratio was obtained at 1.57, which is similar to the value of bone hydroxyapatite. The corrosion resistance and thermal stability of optimal coating were examined by potentiodynamic polarization and thermogravimetric analysis (TGA), respectively. The results showed that the corrosion rate of the optimal coating was 0.58 mm/year, which is very low and appropriate in compared to the Mg–2Zn with a corrosion rate of 2.09 mm/year. The TGA results indicated that the significant weight loss is about 23% and 14% for CS and optimal coating, respectively. The in vitro biocompatibility of the optimal coating was evaluated by cell adhesion, cytotoxicity, and alkaline phosphatase (ALP) assays using MG63 cells. The results indicate that the optimal nanocomposite coating was highly biocompatible, making this material more suitable for applications in bone tissue engineering and to repair bone defects caused by sports injuries.