The invention relates to the technical field of anticorrosive coatings, and concretely relates to a self-repairing anticorrosive coating and a preparation method thereof. The self-repairing anticorrosive coating comprises a component A and a component B. The component A comprises, by mass, 20 to 50 parts of epoxy resin, 10 to 16 parts of a solvent, 0.3 to 1.5 parts of a dispersant, 0.2 to 1.5 parts of a thixotropic agent, 38 to 56 parts of a filling material and 1.5 to 5.0 parts of corrosion inhibitor microcapsules; and the component B comprises, by mass, 70-90 parts of a curing agent and 10-30 parts of solvent. The corrosion inhibitor is loaded in an organic-inorganic hybrid carrier, and the obtained material is added into an anticorrosive coating, so the problems that compatibility between corrosion inhibitor microcapsules and a coating substrate is poor, after a corrosion inhibitor is released, a corrosion inhibitor carrier leaves channels for corrosive substances, more defects arecaused, and the mechanical strength of corrosion inhibitor particles is poor are solved, and the prepared coating is high in corrosion resistance, simple in preparation method, capable of being brushed or sprayed and suitable for large-area construction.