Graphene and N-doped graphene have been widely used for improving the cycling performance of silicon based anode for advancing lithium-ion battery's performance due to their capabilities in suppressing the volume expansion of Si nanoparticles which is responsible for the rapid and irreversible degradation. While it is known that there are pyridinic and pyrrolic nitrogen motifs in the N-doped graphene, there have been no studies of the controllability and optimization of their ratio during N-doping and how it influences on the battery performance. We demonstrate here for the first time that the pyridinic-to-pyrrolic nitrogen ratio is not only controllable in N-doped graphene but also there is an optimal ratio for the enhancement of battery performance. The pyrrolic type N as the major doping form in Nano-Si@NG is shown to deliver a reversible capacity of 950 mA h g−1 over 100 cycles in Li-ion battery performance test, a much better capacity retention than that of bare Si nanoparticle. The degree and type of N-doping in the nanocomposite were shown to be two dominated factors influencing the lithium storage properties, which was supported by X-ray photoelectron spectroscopy (XPS) identification of three types of N-doping structures. The result is further substantiated by density functional theory (DFT) calculation of the energy barrier for diffusion of Li ion in the nanocomposite structure, revealing the smallest diffusion barrier for the pyrrolic type N-doped graphene. Implications of these findings to the design of Nano-Si-based Li-ion battery with high capacity and improved cycle life are also discussed.