Hexagonal boron nitride (h‐BN) is modified by a simple and green method based on self‐oxidation of dopamine and epoxy groups functionalized silane (KH560) grafting. The surface modification and microstructure of h‐BN are characterized by Fourier transform infrared spectroscopy, X‐ray diffraction, X‐ray photoelectron spectroscopy, scanning electron microscopy and transmission electron microscopy. The poly(dopamine) and epoxy groups not only increase the compatibility of the h‐BN and enhance its interaction with epoxy matrix but also exhibit a remarkable superiority in enhancing the anticorrosion performance of epoxy coatings. In addition, the anticorrosion mechanisms of h‐BN@PDA‐KH560 are tentatively discussed. Copyright © 2016 John Wiley & Sons, Ltd.