Combined sulfur and nitrogen (S = 12.9 at.%, N = 9.9 at.%) rich carbons are synthesized for potassium ion anode applications. The low-surface-area carbons (56 m2 g−1) have sulfur covalently bonded to the structure, with minimum unbound “free” sulfur. This allows for exceptional rate capability and stability: Capacities of 437, 234 and 72 mAh g−1 are achieved at 0.1, 1 and 10 A g−1, with 75% retention at 2 A g−1 after 3000 cycles. These are among the most favorable capacity-cyclability combinations reported in potassium ion battery carbon literature. As a proof of principle, the carbons are incorporated into a potassium ion capacitor with state-of-the-art energy and power (e.g. 110 W h kg−1 at 244 W kg −1). According to XPS analysis, the reaction of nitrogen with K+ is distinct from that of K+ with sulfur. The N and N–O moieties undergo a series of complex multi-voltage reactions that result in both reversible and irreversible changes to their structure. The K–S reactions involve a combination of reversible adsorption and reversible formation of sulfides, thiosulfate and sulfate. GITT and EIS analysis indicate that incorporation of S into the N-rich carbon increases the K+ solid-state diffusion coefficient by factors ranging from ~3 to 8, depending on the voltage. The diffusivities are asymmetric with charging vs. discharging, signifying distinct reaction pathways. The covalently bound sulfur also has a positive influence on the solid electrolyte interphase (SEI) formation, at early and at prolonged cycling.