Nitrogen atoms doping was widely recognized as the promising technique to improve the electrochemical performances of various carbonaceous materials application for energy storage devices. Herein, we reported a facial fabrication of highly N-doped graphene-like carbon (NGC) through the carbonization of a mixture containing polypyrrole and g-C3N4 nanosheets, which was employed as sacrificial template and extra nitrogen source simultaneously. The resultant NGC material integrate a range of excellent features including high nitrogen contents (17.54 at%), large specific surface areas (635.73 m2 g−1) and abundant mesopores with high pore volume (1.9483 cm3 g−1). As anode material in Li-ions batteries, the NGC material exhibits an promising initial discharge capacity of 2749 mAh g−1 at a current density of 50 mA g−1 and encouraging cycling stability (1143 mAh g−1 after 200 cycles) as well as excellent rate performance (440 mAh g−1 at 2 A g−1). This feasible fabrication presents a new guidance to exploit high performance N-doped carbon materials for the applications in energy storage devices.