This work investigates the conditions required for the pulse galvanostatic electropolymerization of aniline in synthesizing polyaniline (PANI) nanofibers. In order to obtain uniform morphology in polyaniline nanofibers, the effects of such variables as pulse height (current amplitude), relaxation time (t off), pulse time (t on), bath temperature, HClO4 and aniline concentrations were studied using SEM, TEM, FT-IR, UV–vis spectroscopy, cyclic voltammetry, TGA and DSC. The attained results reveal that the optimized conditions for the pulse height, t on, t off, aniline, HClO4, and solution temperature are 10mAcm−2, 0.5s, 0.25s, 0.1M, 1M, and 45°C respectively. The synthesized polyaniline in the optimum conditions possess uniform nanofibers, with an average diameter of 80nm and an average length of 4μm; further, it displays satisfactory electrochemical reversible redox reactions and high thermal stability.