Aluminum alloys are widely used in many fields because their advantages. However, the life of aluminum alloys is largely affected by the corrosion environment. So, it is important to conduct corrosion resistance treatment on aluminum alloys. Herein, the composite film of lauric acid (LA)/graphene is prepared by electrodeposition on aluminum alloys. The morphology, structure, wettability, and chemical compositions are characterized by scanning electron microscopy (SEM), water contact angle (WCA), Fourier‐transform infrared spectroscopy (FTIR), Raman spectra, and X‐ray photoelectron spectroscopy (XPS). The electrochemical tests and the corrosion resistance of the composite film are investigated. It is found that the composite film improves the corrosion resistance of the aluminum alloys. Compared with aluminum alloys substrate, the resistance value of the composite film increases by two orders, the corrosion current density decreases by three orders, and the salt spray test time reaches 386 h. Meanwhile, the study of computational chemistry indicates that LA and graphene are adsorbed on the aluminum alloy surface by the COAl chemical bond. Finally, the film‐forming mechanism indicates that cerium ions induce LA in the process of electrodeposition, which makes LA form chemical bonds with aluminum alloys on the metal surface to form films.