Mesoporous nitrogen-doped graphene nanoflakes (N-GNFs) with high nitrogen doping level of 5.0–10.7 at.% were produced by a facile template CVD synthesis using the mixture of acetonitrile and benzene as a precursor. The pore structure, morphology and physicochemical properties of N-GNFs were characterized by TEM, XPS, Raman spectroscopy, and low-temperature nitrogen physisorption. The electrochemical performance of N-GNFs was tested in electric double-layer capacitor (EDLC) with ionic liquid electrolyte (1.2 M N+Et4TFSI− solution in CH3CN) by cyclic voltammetry, galvanostatic charge-discharge measurements, and electrochemical impedance spectroscopy. With increasing the nitrogen content in N-GNFs their specific capacitance increased and achieved 167 F g−1 at a scan rate of 5 mV s−1. The maximum delivered energy density was 46.3 Wh kg−1, which corresponded to a power density of 0.74 kW kg−1. The high electrochemical performance of N-GNFs was attributed both to the pseudo-capacitance of active nitrogen sites and to the developed mesoporosity. Different tetraalkylammonium bis(trifluoromethylsulfonyl)imide ionic liquids were used to evaluate the cation size effect on the stability and performance of N-GNFs-based EDLCs. In contrast to N+Et4TFSI− and N+Bu4TFSI− electrolytes, the cycling performance of N-GNFs in N+Me4TFSI− was limited because of the electrode degradation resulted from the intercalation of N+Me4 ions between graphene layers and their exfoliation.