N,O-containing micropore heteroatom carbon frameworks (MHCFs@600) were synthesized by ionothermal synthesis approach using 4,4′-(4-oxophthalazine-1,3(4H)diyl)dibenzonitrile. (CH 3 CH 2 CH 2 CH 2 ) 4 N + (PF 6 ) − was then introduced into the hierarchical pore structure with pore size ranging from 0.3 to 5.8 nm by simple and high-efficiency host−guest interaction to obtain an electrode material (f-MHCFs@600) rich in N (6.15 wt %), O (8.22 wt %), P (1.61 wt %), and F (5.86 wt %). After introduction of F and P, the prepared f-MHCFs@600 showed a voltage window (1.4 V) larger than the theoretical potential of water (1.23 V). f-MHCFs@600 exhibited a high specific capacitance of 244.8 F g −1 at 0.1 A g −1 and an excellent cycling stability (capacitance retention of 98.5% over 10 000 cycles) in a three-electrode system at a high voltage window (1.4 V) because of the stable existence of P and F. In particular, compared to the MHCFs@600, R Ω decreased from 1.68 to 0.318 Ω and R ct changed from 25 to 4.2 Ω in the high-frequency area of the