Constructing hierarchical porous structures on the current collectors is an attractive strategy for improving the rate performance of the Li ion battery electrodes. However, preparing hierarchical porous structures normally requires hard or soft templates to create hollows or pores in different sizes. Rigorous preparation conditions are needed to control the size (especially nanosize) and size distribution of the pores obtained by conventional methods. Herein, we describe a template-free two-step synthesis process to prepare hierarchical porous Co3O4 films on Ni foam substrates. In this synthesis process, free-standing mesoporous precursor flakes are deposited on Ni foams by an electrochemical method. Subsequently, the meosporous precursor flake arrays are calcined to obtain hierarchical porous Co3O4 films. More strikingly, the size of the mesopores in the flakes can be adjusted by altering the calcination temperature. The structure and morphology of the samples are characterized by scanning electron microscopy, transmission electron microscopy and Brunauer–Emmett–Teller measurements. The relationship of the in-flake-pore size and the calcinations temperature is proposed here. Electrochemical tests have revealed that the hierarchical porous Co3O4 films demonstrate excellent rate performances (650mAhg−1 at 30C) as Li ion battery anodes due to the hierarchical porous structure, which endows fast ion transmission.