To improve the corrosion resistance of the AZ31B magnesium alloy, a micro-arc oxidation coating (MAO) was fabricated on the magnesium alloy, and a MgAlCe-doped layered double hydroxide (LDH) film was prepared on the surface of the MAO coating using the hydrothermal method. The LDH film was composed of LDH sheets, which can not only cover the pores of the MAO coating but also form a rough surface structure. With the increase of hydrothermal temperature from 80 to 110 degrees C, the average diameter of LDH sheets decreased from 2.5 to 0.75 mu m; the average distance between the LDH sheets decreased from 3 mu m to 0.39 mu m; and the coverage rate increased from 56.5 % to 99.8 %. The further increase of hydrothermal temperature led to an inverse tendency of these structural parameters. The hydrophobicity increases with the increase of roughness factor. LDH sheets with small sizes and distances have a large roughness factor and excellent hydrophobicity. The corrosion resistance increases with the increase of the LDH coverage rate. The sample with an LDH coverage rate of 99.8 % had excellent corrosion resistance, with Ecorr of -0.311 V, Icorr of 2.967 x 10-9 A<middle dot>cm-2, and the Z0.01Hz of 9.76 x 105 Omega<middle dot>cm2.