Nitrogen and sulfur co-doped graphene aerogel (NS-GA) is prepared by one-pot process. The as-prepared materials are investigated as supercapacitors electrodes in an ionic liquid (1-ethyl-3-methylimidazolium tetrafluoroborate, EMIMBF4) electrolyte. The NS-GA is characterized using X-ray diffraction, X-ray photoelectron spectroscopy, and Raman spectroscopy scanning electron microscopy. The results show that the NS-GA has hierarchical porous structure. Electrochemical performance is investigated by cycle voltammetry and galvanostatic charge-discharge. Notably, the supercapacitor based on the NS-GA-5 possesses a maximum energy density of 100.7 Wh kg−1 at power density of 0.94 kW kg−1. The electrode materials also offer a large specific capacitance of 203.2 F g−1 at a current density of 1 A g−1 and the capacitance retention of NS-GA-5 is 90% after 3000 cycles at a scan rate of 2 A g−1. The NS-GA-5 with numerous advantages including low cost and remarkable electrochemical behaviors can be a promising electrode material for the application of supercapacitors.