Self-healing coatings improve the durability of magnesium (Mg) implants, but rapid corrosion still poses a challenge in the healing stage. Moreover, Mg-based materials with acceptable bacteria killing, osteogenic and angiogenic properties are challenging in biomedical applications. Herein, the self-healing polymeric coatings are fabricated on Mg alloys using the spin-assisted layer-by-layer (SLbL) assembly of hyaluronic acid (HA) and branched polyethyleneimine (bPEI) followed by chemical crosslinking treatment. The self-healing coatings show excellent adhesion strength and structure stability. The corrosion resistance is improved due to the physical barrier of polymer coatings, which also promotes the formation of hydroxyapatite (HAp) during degradation for further protection of Mg substrate. Owing to the dynamic reversible hydrogen bonds existing between HA and bPEI, the crosslinked multilayered coatings possess fast, substantial, and cyclic self-healing capabilities leading to restoration of the original structure and functions. Invitro investigations reveal that the self-healing coatings have multiple functionalities pertaining to bacteria killing, cytocompatibility, osteogenesis, as well as angiogenesis. In addition, the self-healing coatings stimulate alkaline phosphatase activity (ALP), extracellular matrix (ECM) mineralization, and the expression of osteogenesis-related genes of mBMSCs and HUVECs. This study reveals a feasible strategy to design and prepare versatile self-healing coatings on Mg implants for biomedical applications.