Supporting Information: 1. Electrochemical measurements employed in present work. All electrochemical measurements employed in the present work were carried out on a CHI 660D electrochemical workstation (ChenHua Instruments Co. Ltd., Shanghai) at room temperature in a three-electrode cell using 6 mol L−1 KOH as electrolyte. Detailed electrochemical measurements are as follows: typically, 80 wt % of the carbon sample was mixed with 15 wt % of acetylene black (>99.9%) in an agate mortar with a few drops of ethanol until a homogeneous solution was obtained. Subsequently, 5 wt % of polytetrafluoroethylene (PTFE) was added. After briefly allowing the solvent to evaporate, the resulting paste was pressed onto nickel foam under a pressure of 20 MPa with hydraulic press, serving as the current collector. The prepared electrode was placed in a vacuum drying oven at 120 ºC for 24 h. Each electrode contained about 4 mg of porous carbon material. In addition, Ni foam is selected as current collector for the sake of the convenience of comparability with major published data on nitrogen-containing carbon materials. Here, the prepared electrode, platinum foil and saturated calomel electrode (SCE) were used as the working, counter and reference electrodes, respectively. Specific capacitances derived from galvanostatic tests can be calculated from the equation: C I t mV where C (F g−1) is the specific capacitance; I (A) is the discharge current; Δt (s) is the discharge time; ΔV (V) is the potential window; and m (g) is the mass of active materials loaded in working electrode. Specific capacitances derived from cyclic voltammetry tests can be calculated from the equation: C Vb 1 IdV mv(Vb Va ) Va where C (F g−1) is the specific capacitance; m (g) is the mass of active materials loaded in working electrode; v (V s−1) is the scan rate; I (A) is the discharge current; Vb and Va (V) are high and low potential limit of the CV tests. Fig. S1. SEM images of the C-T-1:1 sample (a) and the C-D-1:1 sample (b). -1 (a) -1 6 20 mV s Current density / A g Current density / A g -1 8 4 2 C-T-2:1 C-T-1:1 C-T-1:2 0 -2 -4 -6 -8 -1.0 -0.8 -0.6 -0.4 Potential / V -0.2 0.0 4 3 2 1 0 -1 -2 -3 -4 -5 -1 20 mV s (b) C-D-2:1 C-D-1:1 C-D-1:2 -1.0 -0.8 -0.6 -0.4 Potential / V -0.2 Fig. S2. Cyclic voltammograms at a scan rate of 20 mV s−1 of the carbon samples obtained from solution-phase method (a) and solid-phase method (b). 0.0 0.0 (a) Potential / V -0.2 C-T-2:1 C-T-1:1 C-T-1:2 -0.4 -0.6 -0.8 -1 10 A g -1.0 -5 (b) C-D-2:1 C-D-1:1 C-D-1:2 -0.2 Potential / V 0.0 -0.4 -0.6 -0.8 -1 10 A g -1.0 0 5 10 15 20 25 30 35 40 Time/s 0 4 8 12 Time/s 16 20 24 Fig. S3. Galvanostatic charge-discharge curves measured at the current density of 10 A g−1 of the carbon samples obtained from solution-phase method (a) and solid-phase method (b). 28 15 -1 20 mV s 4 2 C-T-1:1 C-D-1:1 0 -2 -4 -6 5 C-T-1:1 C-D-1:1 0 -5 -10 -15 -8 -0.8 -0.6 -0.4 Potential / V -0.2 (c) -0.8 -0.6 -0.4 Potential / V -0.2 0.0 -1 -1 100 mV s 40 -1 Current density / A g -1 30 -1.0 0.0 10 0 -10 Current density / A g -1.0 20 50 mV s 10 -1 (a) Current density / A g Current density / A g -1 6 -1 (b) 8 200 mV s (d) 20 0 -20 -20 C-T-1:1 C-D-1:1 -30 C-T-1:1 C-D-1:1 -40 -60 -1.0 -0.8 -0.6 -0.4 Potential / V -0.2 0.0 -1.0 -0.8 -0.6 -0.4 Potential / V -0.2 Fig. S4. Cyclic voltammograms of the C-T-1:1 and C-D-1:1 samples at various scan rates: (a) 20 mV s−1, (b) 50 mV s−1, (c) 100 mV s−1 and (d) 200 mV s−1. 0.0 (a) Potential / V -0.2 -0.4 -0.6 -1 1Ag -0.6 -1.0 0.0 800 -0.2 -0.4 -1 20 A g -0.6 -0.8 -1.0 -2 -5 0 5 10 15 20 25 30 35 40 Time/s 0.0 (d) C-T-1:1 C-D-1:1 (c) -1 10 A g -1.0 600 C-T-1:1 C-D-1:1 -0.4 -0.8 200 400 Time/s (b) -0.2 -0.8 0 Potential / V 0.0 C-T-1:1 C-D-1:1 C-T-1:1 C-D-1:1 -0.2 Potential / V Potential / V 0.0 -0.4 -1 40 A g -0.6 -0.8 -1.0 0 2 4 6 8 10 12 14 16 18 Time/s -1 0 1 2 3 Time/s 4 5 6 Fig. S5. Galvanostatic charge-discharge curves of the C-T-1:1 and C-D-1:1 samples measured at various current: (a) 1 A g−1 (b) 10 A g−1, (c) 20 A g−1 (d) 40 A g−1. 7 8