Excellent transfer and separation of photogenerated charges were achieved by a hierarchical construction: 1-D (one-dimensional) TiO2 nanorod arrays were encapsulated with phosphorous doped graphitic carbon nitride (P-C3N4), decorated with highly dispersed 0-D (zero-dimensional) Co3O4 nanodots. With the P-C3N4 and Co3O4 involved, the Co3O4/P-C3N4/TiO2 ternary photoanode show improved visible lights absorption, increased carrier density, and better PEC performance. The matched and continuous energy band positions in hierarchical Co3O4/P-C3N4/TiO2 photoanode effectively facilitate the photogenerated holes swiftly diffusing from 1-D TiO2@P-C3N4 core-shell structure to the surface of 0-D Co3O4 nanodots, while the photogenerated electrons of photoanode leave to counter electrode. The short diffusion path for holes in 0-D Co3O4 nanodots suppresses the accumulation of surface positive charge (holes). This study provides a perspective for investigating photoelectrochemical water splitting in the Co3O4/P-C3N4/TiO2 heterostructural photoanode for enhanced visible light response.