The invention discloses a preparation method of a metal anti-corrosion hydrophobic film layer, and belongs to the technical field of material engineering. A metal matrix surface is coated with a film by adopting a sol-gel method; the prepared film layer does not crack, has a compact structure, and is good in anti-corrosion performance and hydrophobic property; especially, after the sol-gel film layer is mixed with a corrosion inhibitor (cerate), the self-repairing performance to a certain extent can be acquired, the anti-corrosion capability can be improved, the hydrophobic property can be remarkably improved, and the static contact angle can reach 125 degrees; the preparation method can solve various problems that the hydrophobic property of the surface obtained after the modification by adopting various surface processing technologies is comparatively poor, the traditional surface processing technology is complicated in process, the equipment requirement is high, the environment is polluted, and the energy source consumption is great, and the method is suitable for the metallic material field in aviation, spaceflight, vessel and automobile industries; besides, the technology adopted by the method is simple, the raw materials are easy to get, the equipment investment is low, and the economic return is high.