Ultrahigh-rate capability supercapacitors that can tolerate charging/discharging at ultrahigh current density are particularly attractive for high-power applications. At present, mesopore-engineering and heteroatom-doping have been proven to be the effective ways for concurrently enhancing energy density and rate capability. Herein, we report the fabrication of O/N-codoped mesoporous carbons with ultrahigh mesoporosity and well-defined mesopores by one-step Na 2 CO 3-activation of covalent triazine-based frameworks that derive from 2,4,6-tris(4cyanophenoxy)-1,3,5-triazine monomer (CTFO) at 800-1000°C. The as-obtained O/N-co-doped carbon (CTFC-900) with up to 99 % mesoporosity possesses a layered structure together with a high specific surface area (2425 m 2 g À 1) and a high N/O content (6.98 at% N and 10.32 at% O). Owing to these merits, the supercapacitor based on CTFC-900 electrode exhibited a high specific capacitance of 287 F g À 1 at 1.0 A g À 1 and an ultrahigh rate capability of 66.1 % at 1-1000 A g À 1 in alkaline electrolyte. Moreover, the CTFC-900-based supercapacitor in neutral electrolyte achieved both high energy density (32.2 Wh kg À 1) and high power density (187 kW kg À 1).