Mesoporous carbons are highly porous materials, which show large surface area, chemical inertness and electrochemical performances superior to traditional carbon material. In this study, we report the preparation of nitrogen-doped and undoped mesoporous carbons by an optimized hard template proce…