Nanostructured polyaniline films with controlled thickness have been successfully grown on fluorine-doped tin oxide (FTO) glass substrates using the cyclic voltammetry (CV) method at room temperature. The formation mechanism of the polyaniline film is monitored by CV techniques, alternating current (AC) impedance spectroscopy, scanning electron microscopy (SEM) and atomic force microscopy (AFM). It is found that the accumulation of nanostructured polyaniline (>70 nm) on both the scattered and compact layers simultaneously increased the reactive interface, which supports charge transfer at the interface and resistance that hinders electronic transport in the film. By optimising the preparation conditions, the short-circuit photocurrent density of a dye-sensitised solar cell (DSSC) with a PANI counter electrode (CE) increased by 11.6% in comparison to a DSSC with an electrodeposited platinum CE.