The hydroquinone monosulfonate-doped polypyrrole (PPy-HQS) nanowires were successfully fabricated by potentiostatic electropolymerization of pyrrole (Py) inside the pores of home-made through-hole anodic aluminum oxide (AAO) membranes. The AAO templates with a nominal pore diameter of 80nm were prepared by a two-step anodization process. The potentiostatic electropolymerization of HQS-doped polymer nanowires was carried out in 0.1M NaClO4, or 0.1M LiClO4 or 0.1M citric acid containing 0.05M pyrrole and 0.05M potassium hydroquinone monosulfonate. The synthesized PPy-HQS nanowire arrays were tested as potential potentiometric pH sensors. It was found that pH sensors based on PPy-HQS nanowires exhibited better electrochemical performance toward pH sensing than those based on PPy-HQS thin films. The best potentiometric response to pH changes and a very good stability in time showed the sensor based on the PPy-HQS nanowires polymerized in a 0.1M LiClO4 solution.