Zeolite films which rely on molecular sieving characteristics have been widely used in membranes and membrane reactors1. Recently, their other remarked properties make their applications extend to functional coatings2, such as corrosion-resistant coatings3 and low dielectric constant insulators4. Almost all the performance is beneficial to a preferred orientation. The orientation is carefully controlled in seeded growth which requires multi- steps, while simple in situ synthesis often leads to a random orientation. So how to simply control the orientation is a great challenge both in academic and industry. To this end, we invented an in situ electrochemical ionothermal method which introduces an electric field to the ionothermal system to control the orientation. The Al working and counter electrodes were both used as substrate and Al source for zeolite films. And a Pt wire acts as the pseudo-reference electrode within the common three-electrode cell. The synthesis solution consisted of only ionic liquid 1-ethyl-3-methylimidazolium bromide ([emim]Br), phosphorus source H3PO4 and mineralizing agent HF. In the ionothermal tests, only a few cauliflower-like aggregates were found after 4 h at 190 °C since the Al source is insufficient. We had expected, zeolite would be deposited on the anode as electro-oxidation can provide the desired Al3+ amount. However, only dense phase AlPO4 was found. Surprisingly, an in-plane orientated flower-like AlPO4-11 film was successfully synthesized on the cathode after 4 h synthesis. These surprising results promote us to ask why an in-plane oriented film was formed on the cathode instead of the anode. The most important distinction between the two electrodes are the occurring electrochemical reactions, and they bring the opposite surface charges, thereby adsorbing or repelling the [emim]+ cations which act as the structure-directing agents (SDA) by means of electrostatics (Figure.1). Under the effect of electrically adsorbed SDA, the cathode reacts with phosphorus acid and converts to AlPO4-11. This conversion takes place at any bare point of Al cathode under electric field, and the cathode surface was completely covered by a defect-free AlPO4-11 film. And its orientation is underlain by the cathode self-provided Al source and the fast crystallization rate at 190 °C. To control over the out-of-plane orientation, a growth centers layer should be firstly formed at lower temperature than 190 °C. However, only a negative current was not successful to obtain that layer even at 160 °C due to the insufficient amount of Al source. Whereas adjusting Al amount by electro-oxidation is a contradiction to film growth which needs adsorbed [emim]+ cations. To solve this problem, current cycles were developed. And each current cycle constituted of a positive current and a following negative current, which were used to provide Al source and adsorb [emim]+ cations, respectively. Then the layer was expanded to out-of-plane oriented film under a negative potential at 170 °C. The orientation is consistent with the XRD result. It should be highlighted that both in-plane and out-of-plane oriented growth at negative potentials can obtain defect-free films. As evidence, DC polarization test were used. DC polarization is a common technique to test the anticorrosion performance of films, the lower the corrosion current density, the better the corrosion resistance, and the fewer defects of films. The in-plane oriented film was better candidate than out-of-plane oriented one since the corrosive medium could not penetrate to Al substrate through its channels. The excellent corrosion-resistant performance of in-plane oriented film shows the electrochemical synthesized films are defect-free. Figure.1 Schematic illustration of in-situ electrochemical synthesis of AlPO4-11 film on Al electrodes 1. a) M. E. Davis, Nature, 2002, 417, 813; b) S. Gu, R. Cai, Y. S. Yan, Chem. Commun., 2011,47, 2856-2858 2. a) C. M. Lew, R. Cai, Y. S. Yan, Acc. Chem. Res., 2010, 43, 210–219; b) R. Cai, Y. Liu, S. Gu, Y. S. Yan, J. Am. Chem. Soc. 2010, 132, 12776–12777 3. a) R. Cai, M. W. Sun, Z. W. Chen, R. Munoz, C. O'Neill, D. E. Beving, Y. S. Yan, Angew. Chem. Int. Ed., 2008, 47, 525 –528; b) R. Cai, Y. S. Yan, Corrosion , 2008, 64, 271-278 4. a) Z. B. Wang, A. P. Mitra, H. T. Wang, L. M. Huang, Y. S. Yan, Adv. Mater. 2001, 13, 1463; b) S. Li, Z. J. Li, Y. S. Yan, Adv. Mater. 2003, 15, 1528 Figure 1