[email protected] nanoparticles, prepared by varying ratios of PPy and dopamine hydrochloride, could be used as near infrared (NIR)-absorbing photothermal agents given that the UV–vis–NIR light absorption spectra showed a broad absorption band at 800–900 nm. A NIR-induced shape memory-assisted self-healing epoxy resin coating was obtained, and its shape memory effect was investigated by 808 nm NIR irradiation. Results indicated that the addition of [email protected] nanoparticles improved the shape recovery behavior of the composite. The self-healing property of the coatings was investigated by electrochemical test. Results of linear sweep voltammetry (LSV) and electrochemical impedance spectra (EIS) verified that the coating with 5 wt% [email protected] nanoparticles had a much better light-induced shape memory effect, self-healing performance, and protective capability than those of other contents of [email protected] nanoparticles. Moreover, the shape memory effect of the coating should be affected by the corrosion product of the metallic substrate.