As the anode material of lithium-ion battery, silicon-based materials have a high theoretical capacity, but their volume changes greatly in the charging and discharging process. To ameliorate the volume expansion issue of silicon-based anode materials, g-C N /Si nanocomposites are prepared by using the magnesium thermal reduction technique. It is well known that g-C N /Si nanocomposites can not only improve the electronic transmission ability, but also ameliorate the physical properties of the material for adapting the stress and strain caused by the volume expansion of silicon in the lithiation and delithiation process. When g-C N /Si electrode is evaluated, the initial discharge capacity of g-C N /Si nanocomposites is as high as 1033.3 mAh/g at 0.1 A/g, and its reversible capacity is maintained at 548 mAh/g after 400 cycles. Meanwhile, the improved rate capability is achieved with a relatively high reversible specific capacity of 218 mAh/g at 2.0 A/g. The superior lithium storage performances benefit from the unique g-C N /Si nanostructure, which improves electroconductivity, reduces volume expansion, and accelerates lithium-ion transmission compared to pure silicon.