Environmentally friendly and low-cost Cu2ZnSnS4 (CZTS) is a promising light absorber for photoelectrochemical (PEC) hydrogen production from water splitting due to the earth-abundant elements, high absorption coefficient, and narrow bandgap. Herein, the hierarchical CZTS film with porous nanostructures was successfully synthesized by a template method. The hierarchical CZTS film was composed of flower-like particles, which were assembled with thin CZTS nanosheets. Macropores were generated owing to the aggregation of flower-like spheres, and mesopores were formed from the stacking of CZTS nanosheets. Compared to the dense CZTS film, the porous hierarchical CZTS film showed a much higher PEC property for water splitting. The improved performance could be attributed to three merits of the porous hierarchical morphology: enhanced light absorption, improved charge separation and transfer, and enlarged electrochemically active surface area. This study provides a useful idea to design efficient semiconductor photoelectrodes for water splitting with delicately controlled morphology.