Porous activated nanocarbons with well-controlled dimensionality and morphology (i.e. 0D activated carbon nanoparticles, 1D activated carbon nanotubes, and 2D activated carbon nanosheets) were derived successfully from different template-induced polyaniline nanostructures by facile carbonization and activation processes. The obtained nanocarbons show large specific surface areas (1332-2005 m(2) g(-1)), good conductivities, and highly porous nanoscale architectures. The supercapacitors fabricated using the shape-controlled nanocarbons exhibit high specific capacitance, excellent rate capability, and superior long-term cycling stability in both aqueous and ionic liquid electrolytes. More importantly, a very high energy density of 50.5 W h kg(-1) with a power density of 17.4 kW kg(-1) can be obtained from the activated carbon nanotube based supercapacitors in an ionic liquid electrolyte (with a charge time of similar to 10 s), making these nanocarbons promising candidates for high-performance energy storage devices.