Nowadays, antimicrobial N‐halamine polymers and coatings are extensively studied thanks to their qualities such as effectiveness toward a broad spectrum of microorganisms and regenerability. An N‐halamine organic polymer contains nitrogen–halogen covalent bonds. Its antimicrobial properties are due to the oxidizing power of the halide atoms, which are at the oxidation state + I in chloramine (>N‐Cl) or bromamine (>N‐Br) groups. The aim of the present work was to generate a new N‐halamine coating in a two‐step route. First, we have synthesized by electroreduction of in situ generated aminophenyl diazonium cations polyaminophenyl films because these films contain numerous amino functions. Electrochemical quartz crystal microbalance (EQCM) allowed us to determine the mass of the film formed by cyclic voltammetry and to estimate its thickness; the highest one is about 1 µm. Then, the second step of the process was the formation of haloamine functions into the polyaminophenyl film by substitution of H atoms of the amine functions by Br or Cl atoms. The films were observed by SEM, and their composition was determined by Energy‐dispersive X‐ray spectroscopy (EDS). Finally, the EQCM experiments allowed us to estimate that the N‐halamine films that we have prepared contain one Cl atom or one Br atom for 4 or 4.5 phenyl groups, respectively. Copyright © 2016 John Wiley & Sons, Ltd.