The utilization of MgLi alloy has garnered significant attention due to its potential for various applications. However, its vulnerability to corrosion remains a challenge that should be overcome for widespread use. In response to this challenge, we present a skin-inspired self-healing coating, applied to micro-arc oxidation (MAO)-treated MgLi alloy. The coating is composed of epoxy resin, polyvinyl alcohol (PVA) and tannic acid (TA). Like the animal skin, epoxy resin acts as the epidermis, which blocks the invasion of the external corrosive species. Even being damaged by the mechanical effect, the inner PVA and TA polymer connects by hydrogen bonding, which exhibits a swelling effect in aqueous medium to heal the damage area. Even water penetrates into the underneath substrate, TA as the corrosion inhibitor will react with Mg2+ to form tannate as the inner layer to prohibit further corrosion. Scanning electron microscopy (SEM), X-ray photoelectron spectroscopy and atomic force microscopy are utilized to characterize the microstructure, chemical composition and topology of the coating. Corrosion protection experiments demonstrate that the MAO-PVA/TA-epoxy coating exhibits high anti-corrosion ability compared to MAO-PVA/TA and MAO coating. The |Z|0.01Hz value of 1.13 × 109 Ω cm2 is two and six orders of magnitude higher than the other two coatings. An in-depth comprehension of the self-healing process is achieved through ex situ examination utilizing SEM and energy-dispersive spectroscopy techniques. For real-time observation of the self-healing process of the coating, we employ a scanning vibrating electrode technique and a three-dimensional digital microscope. The reported coating, endowed with self-healing capabilities, holds tremendous promise for expanding the scope of applications for MgLi alloy in the realm of science and engineering.