A novel kenaf stem-derived porous carbon/nitrogen-doped carbon nanotubes/polyaniline (denoted as KSC/NCNTs/PANI) nanocomposite was constructed in this work. Three-dimensional (3D) KSC/NCNTs nanocomposites were firstly constructed through a CVD method. The NCNTs were densely distributed on the channel walls of KSC, which increased both the effective surface area and the active sites greatly. Then, the PANI was grown on the KSC/NCNTs by using in situ chemical oxidation polymerization method. The obtained 3D KSC/NCNTs/PANI nanocomposites were carefully characterized by scanning electron microscopy, Fourier transform infrared spectroscopy and Raman spectra. The nanocomposites were employed as the electrode materials of supercapacitors owing to their unique advantages originating from both PANI (e.g. interesting electroactivity, high pseudocapacitance, unusual doping/dedoping chemistry) and KSC/NCNTs (e.g. large specific surface area, high porosity, good electrical conductivity), and exhibited a high specific capacitance. At the current density of 0.1Ag−1, the KSC/NCNTs/PANI nanocomposites showed a specific capacitance of 1090Fg−1 with a specific energy density around 97Whkg−1. Moreover, the specific capacitance remained 96.9% after 1000 charging/discharging cycles at a current density of 0.1Ag−1.