Hollow carbon spheres (HCSs) materials have been investigated extensively for various applications in energy storage, catalysis, electrochemical conversion. At present, template method using liquid or gaseous carbon sources is the dominant synthetic route for HCSs. Herein, HCSs with high nitrogen doping levels are synthesized by employing graphitic carbon nitride (g-C3N4) solid precursor as carbon and nitrogen sources with the presence of Zn templates. The successful synthesis of N-doped HCSs using solid g-C3N4 precursor is confirmed by a series of characterization technologies. Serving as the anode materials in lithium ions batteries, promising lithium ions storage performances are obtained for the resultant N-doped HCSs. Brilliant specific capacities of 1506.6 mAh g−1 at 0.1 A g−1 and 519.2 mAh g−1 at 5 A g−1 are recorded after 360 cycles. The promising lithium ion storage performances of the N-doped HCSs are ascribed to the unique hollow structure with large surface area, suitable nitrogen doping level and large inner pore volume. The presented work provides a new route to synthesize HCSs or heteroatoms doped HCSs materials using solid carbon sources.