TiO2 nanoparticles (NPs) in the size of ∼25 nm, namely P25, are very common material as the electron collecting layer in dye-sensitized solar cells (DSSCs). However, the light-scattering improvement of TiO2 NP photoelectrodes is still a challenge. Here, we built TiO2 cavities on the top of the TiO2 NP layer by using carbonaceous microspheres as the template, forming the TiO2 cavity/nanoparticle (C/NP) photoelectrode for the application in DSSCs. The cavity amount in the TiO2 C/NP photoelectrode was controlled by adjusting the weight ratio of carbonaceous microspheres. SEM results confirm the successful formation of the double-layered TiO2 C/NP electrode. J—V tests show that the optimized TiO2 C/NP electrode prepared with 25 wt.% carbonaceous microspheres contributes to remarkable improvement of the short-circuit current density (Jsc) and the power conversion efficiency (PCE). The best photovoltaic performance solar cell with the PCE of 9.08% is achieved with the optimized TiO2 C/NP photoelectrode, which is over 98% higher than that of the TiO2 NP photoelectrode. Further investigations of UV-vis DRS, IPCE, OCVD, and EIS demonstrate that the competition between light scattering effect and charges recombination in this TiO2 C/NP photoelectrode is responsible for the PCE enhancement.