A three-dimensional ordered macroporous (3DOM) cobalt ferrite (CoFe2O4) was prepared using polystyrene (PS) colloidal crystal template. The scanning electron microscopy (SEM) and the transmission electron microscopy (TEM) micrographs showed that the as-prepared CoFe2O4 material had a typical 3DOM structure, which was constructed with about 130nm-sized macropores and 10–20nm-sized walls. The obtained CoFe2O4 material had a specific surface area of 66.67m2 g−1, and could deliver a relatively high capacity of 702mAhg−1 (about double that of graphite) at a current density of 0.2mAcm−2 after 30 cycles. Owing to the 3DOM nanoarchitecture, the as-prepared CoFe2O4 electrode exhibited a good rate performance. The results suggest a promising application of the 3DOM CoFe2O4 as anode material for lithium ion batteries.