Molybdenum disulfide (MoS 2 ) demonstrates promising applications in enhancing the corrosion and wear resistance of metals, but the susceptibility of this nanomaterial to agglomeration hinders its overall performance. In this study, the externally assisted corrosion inhibitor sodium molybdate (SM) was successfully constructed in diatomaceous earth (DE) and molybdenum disulfide (MoS 2 ). This not only served as a molybdenum source for MoS 2 but also enabled the preparation of DE@MoS 2 -SM microcapsules, achieving a corrosion inhibitor loading of up to 23.23%. The corrosion testing reveals that the composite coating, when compared to the pure epoxy coating, exhibits an impedance modulus 2 orders of magnitude higher (1.80 × 10 9 Ω•cm 2 ), offering prolonged protection for magnesium alloys over a 40 day period. Furthermore, a filler content of 3% sustains a coefficient of friction (COF) at 0.55 for an extended duration, indicating commendable stability and wear resistance. The protective performance is ascribed to the synergistic enhancement of corrosion and wear resistance in the coatings, facilitated by the pore structure of DE, the high hardness of MoS 2 , and the obstructive influence of Na 2 MoO 4 . This approach offers a straightforward and efficient means of designing microcapsules for use in corrosive environments, whose application can be extended in industrial fields. In particular, we promote the application of nautical instruments, underwater weapons, and seawater batteries in the shipbuilding industry and marine engineering.