We report here a novel approach to the templateassisted electrochemical synthesis of vertically aligned polyaniline (PANI) nanostructure surface arrays. When PANI is obtained by electropolymerization inside a custommade anodic aluminum oxide (AAO) template, with an Au layer sputtered onto one side of the AAO acting as an anode, PANI nanotubes are obtained. In contrast, when the surface of this gold layer is modified with 4-aminothiophenol (4-ATP) as a self-assembled monolayer (SAM) film anchored to the gold layer via the thiol groups and on the opposite end having NH 2 functionalities, we obtain a surface array of PANI nanowires. Cyclic voltammetry and SEM analysis show that the amino functionalities of Au/SAMs act as a nucleation site in the internal base of the AAO pore and determine both the morphology and structure of polyaniline and its electronic properties as well.