An efficient chemical synthesis route, with an aim of reaching an ultrahigh nitrogen (N)‐doping level in carbon materials can provide a platform where the type and amount of N dopant can be tuned over a wide range. We propose a C‐S‐C linkage‐triggered confined‐pyrolysis strategy for the high‐efficiency in situ N‐doping into carbon matrix and an ultrahigh doping level up to 13.5 at %, which is close to the theoretical upper limit (15.2 at %) is realized at a high carbonization temperature of 1000 °C. The pyridinic N is dominant with a maximum percent of 48.7 %. By using I3− reduction as an example, the resultant NCM‐5 exhibits the best activity with a power conversion efficiency of 8.77 %. A pyridinic N site‐dependent activity is demonstrated in which the amount of active sites increases with the increase of pyridinic N, and the carbon atom adjacent to electron‐withdrawing pyridinic N at the armchair edge acts as the most favorable site for the adsorption of I2.