Boron and nitrogen co-doped porous carbons (BNCs) were prepared through a facile procedure using citric acid, boric acid and nitrogen as C, B and N precursors, respectively. The BNC samples were characterized by X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), and nitrogen sorption at 77K. Cyclic voltammetry and galvanostatic charge/discharge experiments were adopted to investigate their electrochemical behaviors. The BNC-9 and BNC-15 samples with high specific surface areas of 894 and 726m2 g−1 showed the large specific capacitance up to 268 and 173Fg−1, respectively, with the current of 0.1Ag−1. When the current was set as 1Ag−1, the energy densities were 3.8 and 3.0Whkg−1 and the power densities were 165 and 201Wkg−1 for BNC-9 and BNC-15, respectively. Thus, BNC-15 is more suitable to apply in high-power-demanded occasion, while BNC-9 tends to store more energy.