We reported the realization of superhydrophobic layered double hydroxide (LDH) coating with the double-anticorrosion mechanism on magnesium alloys. This coating was prepared via in-situ growth of LDHs on the etched AZ31 alloy and the modification was caused by 1H, 1H, 2H, 2Hperfluorooctyltrimethoxysilane. The water contact angle on the coating was as large as 161°, possessing the two-scale rough structure consisting of microislands and LDH crystal nanosheets. The excellent corrosion resistance properties of the superhydrophobic LDH coating can be attributed to the double-anticorrosion mechanism associated with LDH coating and superhydrophobic structure. In addition to the active protection of LDH coating, the passive protection of superhydrophobic coating can suppress the occurrence of ion-exchange reactions, leading to excellent corrosion resistance stability.