Polyaniline (PANI) nanotubes with rectangular cross section, which had 90–500 nm in outer diameter and 30–400 nm in inner diameter, were synthesized via a self‐assembly process in the presence of chiral acid (1S)‐(+)‐10‐camphorsulfonic (D‐CSA) and non‐chiral hydrochloric acid (HCl) coordinating with sodium dodecylbenzenesulfonate (SDBS), respectively. By using SEM, TEM, OM, FTIR, and WAXD, the as‐prepared PANI nanotubes with diversified morphologies were also characterized so as to investigate the formation mechanism of such tubular nanostructures with square cross sections. The results showed that the bilayer‐lamellar micelles formed by anilinium cations and CSA anions acted as the primary templates in the formation of the flat oligomer flakes, and the flakes finally united together to form rectangular nanotubes initiated by the reaction of the active centers on their edges. This study sheds light on the formation process of the PANI nanotubes with rectangular holes and outer contours and may be instructive to the controllable growth of certain nanostructures with unique morphologies. Copyright © 2011 John Wiley & Sons, Ltd.