Carbonaceous materials have been proved to be promising materials for energy storage. Heteroatom doping, especially N doping, could further promote their electrochemical performance, and the type of doped N configuration plays a key role in determining the reactivity of doped carbon. However, achieving a high proportion of active N (pyridinic N) in N doped carbon is still a big challenge. In this work, we successfully tuned the N species and achieved high-level pyridinic N in carbon via constructing a three-dimensional (3D) honeycomb-like structure in conjunction with phosphorus doping. The 3D porous structure with sufficient pore defects and edges provides the preconditions for the formation of pyridinic N, and the subsequent P-doping leads to more open edge sites, which further facilitate the formation of pyridinic N. This modification greatly promoted the reactivity of the carbon framework, contributing to rapid interfacial K+ adsorption reactions. The as-obtained P-doped N-rich honeycomb-like carbon thus achieved ultrahigh reversible capacity and outstanding rate capability (with capacities of 419.3 and 270.4 mA h g−1 obtained at 100 and 1000 mA g−1, respectively). This outstanding performance demonstrates that adjusting the proportion of active N in N-doped carbon offers a promising approach toward excellent N-doped carbon materials for energy storage systems.