Polypyrrole (PPy) nanotubes were synthesized by using the complex of methyl orange (MO)/FeCl3 as a template. Then the core–shell polypyrrole/polyaniline (PPy/PANI) composite was prepared by in situ chemical oxidation polymerization of aniline on the surface of PPy nanotubes. The morphology and molecular structure were characterized by transmission electron microscopy (TEM), infrared spectroscopy (IR) and X-ray diffraction (XRD). TEM images confirmed that the composite was core–shell nanotubes. The electrochemical properties of the PPy/PANI composite electrode were investigated by cyclic voltammetry (CV), galvanostatic charge–discharge and electrochemical impedance spectroscopy (EIS). The electrochemical experiments showed that the specific capacitance of the PPy/PANI composite was 416Fg−1 in 1M H2SO4 electrolyte and 291Fg−1 in 1M KCl electrolyte. Furthermore, the composite electrode exhibited a good rate capability and maintained 91% of initial capacity at a current density of 15mAcm−2 in 1M H2SO4 electrolyte.