Traditional carbon materials and transition metal oxides are considered as the best candidates due to their respective advantages for the anode materials of lithium ion batteries. Herein, combining the advantages of carbon and transition metal oxides, we fabricate Co3O4 doped hollow hierarchical porous carbon spheres through a simple spray pyrolysis route with cobalt nitrate and glucose as precursors. The wall thickness of hollow porous spheres can be adjusted through the ratio between cobalt nitrate and glucose. The results of electrochemical test show that the optical product maintains an excellent discharge capacity of 1297.1 mAh g−1 after 200 cycles at 0.2 A g−1 when the molar ratio of glucose and cobalt nitrate is 6:8. In addition, the sample has a discharge specific capacity of 841.0 mAh g−1 after 300 cycles at 1 A g−1. Hollow hierarchical porous structure can efficiently reduce the path of lithium ion transport, and a suitable wall thickness can support the volume change during charge and discharge. Superior charge/discharge capacity, high carbon content, high yield and low cost turn this product into a more promising anode material for lithium-ion batteries.