Nowadays, supercapacitors as energy storage devices have gradually attracted more attention. In this paper, a tailored "staggered reaction" strategy was employed to synthesize the N/S codoped hollow porous carbon nanospheres as an electrode material for high-performance supercapacitors. This manner features the appropriate involvement of the solvent acetone in the reaction within the system, which enables the sequential reaction process to obtain the core–shell structure with different internal and external compositions. Furthermore, the core could be dissolved by soaking in a formic acid solution, thereby achieving a targeted hollow structure. In addition, in situ doping was achieved by selecting suitable precursors (m-phenylenediamine and 2,4-diaminobenzenesulfonic acid) containing N and S, and the effect of N and S content on performance was investigated in detail. The results reveal that with the increase of N and S content, the specific capacitance of carbon nanospheres first increases and then decreases. Ultimately, the maximum specific capacitances of 398 and 277 F·g–1 were obtained under the current density of 0.2 A·g–1 in a three-electrode system and a two-electrode system, respectively. After 10,000 cycles, the specific capacitance can be basically maintained at 100% with excellent cycling stability.