Organic coatings are one of the most used and versatile technologies to mitigate corrosion of metals. However, organic coatings are susceptible to defects and damages that may not be easily detected. If not repaired timely, these defects may develop into major coating failures due to corrosion occurring in the damaged region, thereby limiting the lifetime of the to be protected structure. Thus, the development of smart coatings that can accurately identify corrosion location and reliably recover the damage autonomously is of particular interest. Herein, we reported a robust, corrosion-sensing and self-healing coating which incorporated pH-sensitive ZIF-8-capped CaCO3 microcontainers containing the healing agent tung oil (TO) and the corrosion indicator/inhibitor 1,10-phenanthrolin-5-amine (APhen). The spontaneous leakage of incorporated TO and APhen was restrained, and the release initiated when local pH variation occurred. The corrosion protection performance of the coatings implanted with different contents of smart microcontainers were evaluated. The intact epoxy coating containing 7.5 wt% of the microcontainers exhibited the best protection performance with low water absorption (0.65 wt%), low O2 permeability (0.21 × 10–15 cm3 cm cm−2 s−1 Pa−1), and a high storage modulus (3.0 GPa). Electrochemical impedance spectroscopy (EIS) measurements in 3.5 wt% NaCl solution demonstrated superior durability of the composite coating after self-healing. The immersion test and neutral salt spray test confirmed the coating can accurately report corrosion sites via coloration.