Since the first report on dye-sensitized solar cells (DSSCs) by O’Regan and Grätzel in 1991, DSSCs based on nanocrystalline TiO2 photoelectrodes have attracted considerable interest due to the low production cost, convenient fabrication. In DSSCs, the TiO2 photoelectrode plays a role of providing the sites for dye-loading. For these reasons, the TiO2 photoelectrode needs to have a mesoporous structure with a high internal surface area. Various approaches have been used to fabricate the TiO2 mesoporous film. In the present work, we firstly introduced the ice-templating method to fabricate the TiO2 photoelectrode. This ice-templating method, an environmental friendly and cost-effective process, is used to fabricate the unique hierarchical porous structure. By using this technique, we have successfully fabricated the TiO2 photoelectrode films with hierarchical porous structure. The influence of slurry concentration and TiO2 blocking layer on the DSSC performance was investigated and discussed in detail.