The study of carbonaceous electrode materials for supercapacitors is expanding and remains challenging. Chitosan is one of the many biomasses found in nature that can be converted into porous carbon for electrode materials in supercapacitors. Despite having a high specific surface area and good chemical stability, porous carbons have a limitation of specific capacitance. On the other hand, polyaniline (PANI), a conductor polymer, typically exhibits high specific capacitance but has low stability. Thus, a binary nanocomposite of chitosan-derived porous carbon (CCS) and PANI is suggested to obtain an optimal performance. Porous carbon was produced from chitosan through two steps: (i) hydrothermal carbonization; (ii) chemical activation using steam at a temperature of 800 °C for 2 hours. The CCS was then oxidized with diluted H2O2 to increase surface wettability. Binary nanocomposites were produced by a nanocompositing method of in situ polymerization of PANI with a variation of 5% (CCS/PANI5%), 10% (CCS/PANI10%), and 15% (CCS/PANI15%). The materials were characterized by scanning electron microscopy–energy dispersive X-ray (SEM-EDX), Fourier-transform infrared (FTIR), N2-sorption analysis, and thermogravimetric analysis (TGA). Meanwhile, electrochemical tests were performed using a three-electrode method to obtain cyclic voltammetry and the capacitance of each sample. The N2-sorption analysis showed that the surface area of samples CCS, CCS/PANI5%, CCS/PANI10%, and CCS/PANI15% are 1305 m2.g-1, 430 m2.g-1, 333 m2.g-1, and 238 m2.g-1, respectively. SEM-EDX, FTIR, and TGA proved that PANI is loaded in the carbon surface. From the electrochemical tests conducted at a scan rate of 5 mV.s⁻¹, the specific capacitance values for the samples CCS, PANI, CCS/PANI5%, CCS/PANI10%, and CCS/PANI15% were determined to be 220.27 F.g⁻¹, 143.81 F.g⁻¹, 330.42 F.g⁻¹, 434.73 F.g⁻¹, and 391.27 F.g⁻¹, respectively. The CCS/PANI10% sample exhibited the highest specific capacitance of 434.73 F.g⁻¹, corresponding to an energy density of 86.9 Wh.kg⁻¹ and a power density of 1.3 kW.kg⁻¹. These significant enhancements in specific capacitance underscore the effectiveness of the nanocomposite approach and highlight its potential for improving electrode performance. As a result, the chitosan-based porous carbon and polyaniline nanocomposite developed in this study is a promising candidate for supercapacitor electrode materials.