Wormhole-like mesostructured polyaniline (PANi) has been synthesized by using sodium dodecyl benzene sulfonate (SDBS) as a structure directing agent and iron trichloride (FeCl3 · 6H2O) or ammonium persulfatee (APS, (NH4)2S2O8) as an oxidant in an acidic solution. The formation mechanism and structure of polyaniline was studied by powder X-ray diffraction, transmission electron microscopy and FT-IR spectroscopy. It was indicated that aniline (AN)/SDBS would form lamellar structure in an acidic solution, then after introducing oxidant, the wormhole like mesostructures would be formed. The reaction conditions, such as oxidant, oxidant/AN molar ratio, HCl/AN molar ratio, and the reaction temperature had influence on the formation of mesostructures.