Monodispersed nitrogen-doped hollow mesoporous carbon spheres (N-HMCSs) are prepared.
The sizes and architectures of N-HMCS can be controlled through the adjustment of the content of ILs.
Alkyl chain length of ILs has an important effect on the formation of N-HMCSs.
The N-HMCSs exhibit good supercapacitor performance.