A hierarchical porous carbon with low oxygen content has been prepared by using polystyrene (PS) spheres as template and its structure, composition and performances as anode of lithium ion battery are characterized by scanning electron microscopy (SEM), transmission electron microscopy (TEM), X-ray diffraction (XRD), Fourier transform infrared (FTIR) spectroscopy, element analysis (EA), electrochemical impedance spectroscopy (EIS), and galvanostatic charge/discharge test. The results obtained from SEM, TEM, XRD, FTIR, and EA indicate that the prepared sample has a well-interconnected pore structure with a pore size of 170nm and has an oxygen content of 3.3±0.2wt.%. The low oxygen content of the prepared sample can be ascribed to the low decomposition temperature of the template that was determined by thermal analysis. EIS shows that the prepared sample has lower electrochemical impedance for the lithium insertion/de-insertion than commercial natural graphite and charge/discharge tests show that the battery using the prepared sample as anode exhibits better rate performance than that using the graphite.