Ordered mesoporous carbons (OMCs) are appealing alternatives to conventional porous activated carbon applied to electronic energy storage and conversion devices. Nitrogen-doped OMC (NOMC) was prepared with a soft-template strategy directly using task-specific ionic liquid with dicyanamide anion as the nitrogen dopant, and utilized as supercapacitors for the first time. Compared with pristine OMC, NOMC showed excellent electrochemical capacitive behavior in 6 M KOH electrolyte. NOMC possessed a high specific capacitance of 427 F/g at a current density of 1 A/g and exhibited a stable cycle life (almost 98% retained at a current density of 5 A/g after 2000 cycles). The outstanding capacitive performance of NOMC was ascribed to the synergetic effects of its bimodal mesoporous structure, large specific surface area (1919 m2/g), and nitrogen doping (3.52 wt%), which help to accelerate the ion diffusion, increase the surface charge storage, and intensify pseudo-capacitive reactions.