Abstract Porous active core-shell carbon material with excellent synergistic effect has been regarded as a prospective material for supercapacitors. Herein, we report an integrated method for the facile synthesis of carbide-derived carbon (CDC) encapsulated with porous N-doped carbon (CDC@NC) towards high-performance supercapacitors. Polydopamine (PDA) as nitrogen and carbon sources was simply coated on SiC nanospheres to form SiC@PDA, which was then directly transformed into CDC@NC via a one-step molten salt electro-etching/in-situ doping process. The synthesized CDC@NC with hierarchically porous structure has a high specific surface area of 1191 m2 g−1. The CDC core and NC shell are typical amorphous carbon and more ordered N-doped carbon, respectively. Benefitting from its unique dual porous structures, the CDC@NC demonstrates high specific capacitances of 255 and 193 F g−1 at 0.5 and 20 A g−1, respectively. The reaction mechanism of the electro-etching/in-situ doping process has also been investigated through experimental characterizations and theoretical density functional theory calculations. It is suggested that the molten salt electro-etching/in-situ doping strategy is promising for the synthesis of active core-shell porous carbon materials with synergistic properties for supercapacitors without the need for additional doping/activation processes.