Electrodeposition of polyaniline (PANI) complexes with a polymeric sulfonic acid of variable molecular weight has been studied with the purpose to explain specific features of aniline electropolymerization in the presence of polyelectrolytes. Poly-(2-acrylamido-2-methyl-1-propanesulfonic acid) (PAMPSA) was taken as a model polyelectrolyte due to the ease of varying its molecular weight during polymerization of the monomer. Depending on the polyacid molecular weight, crucial changes in the shape of charge-and potential-time dependences and cyclic voltammograms have been observed during potentiostatic, galvanostatic, and cyclic voltammetry syntheses of PANI, respectively. The results are considered in terms of the influence of molecular weight on proton condensation ability of the polyacid and, therefore, on the degree of aniline protonation and its local concentration in the vicinity of polyacid macromolecule. The PANI films obtained are characterized by cyclic voltammetry and UV-vis and Raman spectroelectrochemistry, and the influence of the polyacid molecular weight on these properties is discussed.