Hierarchical porous cobalt oxide (Co 3O 4) array films are successfully prepared by electrodeposition through polystyrene sphere monolayer template. The as-prepared Co 3O 4 array films exhibit three typical porous structures from non-close-packed bowl array to close-packed bowl array and hierarchical two layer array structures. These Co 3O 4 array films have a hierarchical porous structure, in which the skeleton is composed of ordered arrays possessing nanoporous walls. A possible growth mechanism of porous Co 3O 4 array films is proposed. As anodes for Li ion batteries, the as-prepared Co 3O 4 array films exhibit quite good cycle life and high capacity. The first discharge capacity for the three Co 3O 4 array films is 1511, 1475, 1463 mAh g −1, respectively, and their initial coulombic efficiencies are as high as 72%. The specific capacity after 50 cycles for the three electrodes is 712, 665 and 640 mAh g −1 at 1 C rate, corresponding to 80%, 75%, 72% of the theoretical value (890 mAh g −1), respectively.