The mechanism of electrochemical deposition of poly(p-aminoazobenzene) (PAAB) on a Au electrode from acetonitrile solutions containing pyridine was studied by cyclic voltammetry and potential-step experiments. Cyclic voltammograms indicate that the polymer deposits on the substrate only if the solubility of the oligomeric products of PAAB oxidation drops as a result of growing chain. As it follows from the potential-step experiments, the process of electrodeposition is instantaneous and three dimensional (3DI). At higher pyridine content this mechanism changes into progressive two-dimensional nucleation and growth (2DP). Ex situ FT-IR and in situ Raman spectra were recorded. The spectroscopic data allowed us to establish the molecular structure of polymers deposited at 1.0 and 1.2 V. It appeared that in both cases the deposits are mixtures of at least two structures, the first one of linear structure formed through head-to-tail (C-N) or head-to-head (N-N) coupling and the second one built by ortho-substitution.