Polyaniline (PANI) nanofibers were prepared electrochemically by a template-free method on different active substrates in aqueous solutions containing aniline and inorganic acid or organic acid. The influences of experimental parameters, such as polymerization potential, techniques of applied potential, electrolyte composition, and polymerization temperature, on the morphologies of the PANI nanofibers were systematically investigated. The PANI nanofibers obtained have promising applications in supercapacitors whose specific capacitance is as high as 1.21 × 103 F/g, which is the highest value possible using sulfuric acid (1.00 M H2SO4) as electrolyte. In addition, the formation mechanism of PANI nanofibers is discussed.