Abstract: The highly selective recognition of halide ions by a cross- linked polyviologen film was demonstrated electrochemically. The film was prepared on an electrode by electropolymerization of a branched monomer with three polymerizable groups, 1,3,5- tris(4'-cyanopyridinio-l'-methyl)-2,4,6-trimethylbenzene tribromide, to form a highly cross-linked polyviologen, through successive reductive coupling of the cyanopyridinium moieties. The highly cross-linked structure is built up by the formed viologen skeleton, incorporating the electrolyte anion used as the template to fabricate a kind of cavity structure complementary in size to the electrolyte anion, called anion- imprinted electropolymerization. The resulting cross-linked polyviologen film exhibits highly selective anion recognition in the redox process. The anion-controlled redox process was investigated quantitatively by multilateral analyses with cyclic voltammetry, potential-step chronoamperometry, and electrochemical quartz crystal microbalance measurement coupled with visible absorption spectrophotometry. A highly selective size exclusion effect by the cavity structure fabricated in the anion-imprinted electropolymerization was demonstrated in the redox process of the viologen moiety in different kinds of aqueous electrolytic solutions. From the systematic study of the anion size recognition using a series of halide ions, not only the precisely fabricated cavity structure but also the anion diffusion dynamics in the cavities successfully running are suggested