Interactions between the π bonds in the aromatic rings of polyaniline (PANI) with carbon nanostructures (CNs) facilitate charge transfer between the two components. Different types of phenyleneamine-terminated CNs, including carbon nano-onions (CNOs) and single-walled and multi-walled carbon nanotubes (SWNTs and MWNTs, respectively), were prepared as templates, and the CN/PANI nanocomposites were easily prepared with uniform core–shell structures. By varying the ratio of the aniline monomers relative to the CNs in the in situ chemical polymerization process, the thickness of the PANI layers was effectively controlled. The morphological and electrical properties of the nanocomposite were determined and compared. The thickness and structure of the PANI films on the CNs were characterized by transmission electron microscopy (TEM), scanning electron microscopy (SEM), and infrared spectroscopy. TEM and SEM revealed that the composite films consisted of nanoporous networks of CNs coated with polymeric aniline. The electrochemical properties of the composites were investigated by cyclic voltammetry and electrochemical impedance spectroscopy. These studies showed that the CN/PANI composite films had lower resistance than pure polymeric films of PANI, and the presence of CNs much improved the mechanical stability. The specific electrochemical capacitance of the CNO/PANI composite films was significantly larger than for pure PANI.