Carbon-based materials with multidimensional structures generally exhibit improved properties compared with single-morphology carbon materials for various applications including catalysis, adsorption, and energy storage. Here, an N-doped mesoporous carbon sphere and sheet composite is prepared by a co-assembly strategy using an ionic liquid ([C18Mim]Br) as the structure-directing agent, ethylenediamine as the catalyst, tetraethyl orthosilicate as the pore-forming agent, and resorcinol formaldehyde resin as the carbon precursor. [C18Mim]Br and ethylenediamine not only induce formation of the unique structure but also lead to in situ nitrogen doping on the N-doped mesoporous carbon skeleton. The obtained N-doped mesoporous carbon shows a unique composite structure of thin sheets embedded with carbon spheres, having high a specific surface area and uniform mesopore distribution. When used as an electrode material, the N-doped mesoporous carbon shows a good specific capacity of 273 F g−1 at a current density of 0.5 A g−1 and a good rate capability (82.1% of the capacitance is retained at a high current density of 10 A g−1). Moreover, the N-doped mesoporous carbon exhibited ideal stability behavior (91.6% capacitive retention after 10,000 cycles), indicating a promising role as an electrode material for excellent performance supercapacitors.