Carbon nanotubes with large surface area and surface nitrogen and oxygen functional groups are prepared by carbonizing and activating of polyaniline nanotubes, which is synthesized by polymerization of aniline with the self-assembly method in aqueous media. The physicochemical properties of the carbon nanotubes are characterized by scanning electron microscope, transmission electron microscopy, X-ray diffraction, Brunauer–Emmett–Teller, elemental analyses and X-ray photoelectron spectroscopy measurements. The surface area and pore diameter are 618.9m2 g−1 and 3.10nm. The electrochemical properties of the carbon nanotubes as anode materials in lithium ion batteries are evaluated. At a current density of 100mAg−1, the activated carbon nanotube shows an enormously first discharge capacity of about 1370mAhg−1 and a charge capacity of 907mAhg−1. After 20 cycling tests, the activated carbon nanotube retains a reversible capacity of 728mAhg−1. These indicate it may be a promising candidate for an anode material for lithium secondary batteries.