pH-responsible self-healing core-shell electrospun nanofibers encapsulating oleic acid (OA) and benzotriazole (BTA) corrosion inhibitors were synthesized and added into a coating material for the corrosion protection of carbon steels. The shell of electrospun nanofibers were poly(vinyl alcohol) (PVA), and the healing agents OA and BTA were used as core materials to reseal a damaged region. The average nanofiber diameters was 350 nm, and the surface is smooth, without any bead structure. OA plays a critical role on corrosion inhibitor in 3.5% alkaline sodium chloride solution and the maximum inhibition efficiency was 86.0% after 10 days immersion. BTA works in 3.5% acidic sodium chloride solution and the maximum inhibition efficiency was 83.4% after 5 days immersion. The anti-corrosion and self-healing capability of core-shell coating were evaluated through scanning electron microscopy, transmission electron microscopy, confocal laser fluorescence microscopy, Fourier transform infrared spectroscopy, electrochemical measurement technology, thermo gravimetric analysis, and material test system rack. Results showed that core-shell spinning fibers with corrosion inhibitors at different concentrations were prepared successfully. The core-shell fibers released the inhibitors to form an OA protective film and a BTA passivation film on the exposed metal surface. Electrochemical measurement monitored specifically the self-healing properties of the coating. These result potentially have important value for the design and research of self-healing materials in the future. (C) 2019 Taiwan Institute of Chemical Engineers. Published by Elsevier B.V. All rights reserved.