Porous polyaniline (PANI) is prepared by using sodium dodecylsulfate as a soft template and ammonium persulfate as an oxidant. Transmission electron microscopy and nitrogen adsorption–desorption isotherms suggest the existence of both macro/mesopores and micropores, and the specific surface area of 211m2 g−1. As a result of its porous structure, the porous PANI exhibits highly enhanced utilization ratio during the charge–discharge cycles. This porous PANI also displays high cycle stability and rate capability.