Summary: An ultrasonic irradiation assisted polymerization method has been used to prepare PANI nanotubes and nanofibers by using different doping concentrations of mineral or organic acids. It has been found that PANI nanotubes can be produced when the concentration of the dopant acid is low. However, PANI nanofibers can also be produced when the concentration of the dopant acid is high. For nanotubes synthesized at a low concentration of the dopant acid, the outer average diameter can be changed from about 150 nm using phosphoric acid to 200 nm using nitric acid as the dopant and the inter diameter is in the range of 10–50 nm. For nanofibers, the diameter ranges from about 50 nm using nitric acid to more than 110 nm using perchloric acid as the dopant. The mechanism of the formation of the nanotubes and nanofibers may be due to the formation of different kinds of micelles and the prevention of the second growth of the PANI by ultrasonic irradiation. The chemical structure of the PANI nanotubes and nanofibers are characterized by FTIR and UV‐vis absorption spectra and XRD patterns. The conductivity of the PANI nanofibers is comparable to that of conventional PANI samples.TEM images of PANI nanofibers synthesized under ultrasonic irradiation doped by perchloric acid.magnified imageTEM images of PANI nanofibers synthesized under ultrasonic irradiation doped by perchloric acid.