Nitrogen and sulfur co-doped carbon (NSC) is considered as a promising electrode material for supercapacitors (SCs). However, the specific capacitance and the rate performance of NSC are not satisfied for practical applications due to its inappropriate structural properties. Herein, we report the structural engineering of NSC by optimizing pore structure to obtain an ordered hierarchical pore network. The as-prepared NSC possesses a high gravimetric capacitance of 322 F g-1 at the current density of 1.0 A g−1 and retains 206 F g−1 (64% of its capacitance at 1.0 A g−1) at the high current density of 100 A g−1. Moreover, it reveals an excellent cycling performance with ∼93.4% capacitance retention after 10000 cycles at the current density of 20 A g−1. An assembled symmetric supercapacitor (SC) shows a remarkable energy density of 11.4 Wh kg−1 and a high power density of 12.9 kW kg−1. The outstanding performances of NSC electrodes benefit from the efficient ion diffusion and fast charge transfer. This work paves a way to rationally design and engineer the structure of NSC for achieving both high rate capability and high specific capacitance for SCs applications.