Doping carbon materials with heteroatoms such as N, F is an effective approach to elevating the capacitive performance of supercapacitors. In this paper, nitrogen and fluorine dual-doped two-dimensional (2D) porous carbon nanosheets (PCNSs) have been fabricated by a straightforward template carbonization method, using trisodium citrate as carbon source and self-template, and ammonium fluoride as N/F dopants. The N/F-doped carbon samples are well characterized by a series of techniques and measured in a three-electrode system and two-electrode system, respectively. As a result, N/F-doped carbon has delivered large capacitance of 110[Formula: see text]F[Formula: see text]g[Formula: see text] at 1[Formula: see text]A[Formula: see text]g[Formula: see text] and high-energy density of 3.82[Formula: see text]W h kg[Formula: see text] at the power density of 0.5[Formula: see text]kW[Formula: see text]kg[Formula: see text]. It is also revealed that semi-ionic C–F bonds in PCNSs have enhanced electrical conductivity, hence, facilitating electron transport in the electrode. For comparison, ammonium chloride is used as sole dopant for producing N-doped carbon materials, whose capacitive performances are much lower than the N/F-codoped one, indicating the synergistic effect of N/F for capacitive improvement.