A pressure-dependent self-template pyrolysis strategy is developed to modulate the porosity and surface chemical configuration of carbon, which simultaneously fabricates ultrahigh surface area cathode with good electrolyte compatibility at high voltage and hierarchical anode with high rate capability. The corresponding assembled potassium ion hybrid capacitor exhibits high energy density of 172.8 Wh kg -1 at 223.1 W kg -1 with long-term cycling stability over 10000 cycles. • Porosity and surface chemical configuration of carbon can be regulated by pressure; • The pressure-dependent pyrolysis mechanism is clarified; • The NPC cathodes exhibit good compatibility with electrolyte at high voltage; • The PPC anodes show high-rate capability with adsorption-intercalation behavior; • The assembled PPC//NPC pouch cell exhibit high performance. Herein, a pressure-dependent self-template pyrolysis strategy is developed to modulate the porosity and surface chemical configuration of carbon electrodes (MPCs) for dual-carbon potassium ion hybrid capacitors (PIHCs). Experiments demonstrate that negative pyrolysis pressure (△P = -0.1 MPa) can restrict the growth of templates in the carbon matrix and accelerate surface oxygen removal, contributing to a large surface area of 2383.6 m 2 g -1 with abundant micropores for high adsorption capacity and low surface oxygen content for good compatibility with the electrolyte at high voltage as cathodes. Relatively, positive pressure (△P = 10.0 MPa) prevents the escape of pyrolysis gas which would in turn re-react with the self-generated templates, thereby forming hierarchical macroporous structure composed of interconnected carbon nanosheets and nanoparticles for high-rate capabilities as anodes. As a result, NPC cathodes exhibit high capacity of 63.7 mA h g -1 after 8000 cycles at 2.0 A g -1 , while PPC anodes deliver high capacity of 258.8 mA h g -1 with capacity retention of 93.5% after 10000 cycles at 5.0 A g -1 . The assembled PPC//NPC PIHCs also exhibit high energy density of 172.8 Wh kg -1 at 223.1 W kg -1 , with long-term cycling stability over 10000 cycles at 1.0 A g -1 or 2.0 A g -1 .