Zeolitic imidazolate framework-8 (ZIF-8) was fabricated as a lubrication container to encapsulate lubrication oil, which was added to epoxy resin (EP) as a filler to get the self-lubricating ZIF-8/EP composites coating. The antiwear and anticorrosion peculiarities of EP can be significantly improved by the encapsulation method. The antiwear peculiarities of EP were evaluated by the macroscopic ball-disk friction tests with the 9Cr18 steel ball as the counterface material. The result demonstrates that the coefficient of friction (COF) and wear rate of the self-lubricating ZIF-8/EP composites were reduced by 82.1% and 93.5% compared with that of the pure EP, respectively. Importantly, the ZIF-8/ EP composite shows anticorrosion performance in the artificial seawater (ASW). The constant phase element and effective capacitance of the coating containing ZIF-8 fillers are lower than that of the non-containing coating. In addition, the diameter of the capacitive arc and the impedance modulus of the coating containing ZIF-8 + YR1800 are higher than those of the coating non-containing, which proved that the corrosion resistance of the EP is improved by the ZIF-8 + YR1800.