The flatband potential of nanoporous TiO2 film electrodes has been studied by spectroelectrochemical method. The effect of film thickness and TiCl4 treatment on the flatband potential of nanoporous TiO2 electrodes and the photovoltaic performance of dye-sensitized solar cells were determined. The results showed that with the increasing of film thickness, the flatband potential shifts in the positive direction, and the open circuit voltage of corresponding solar cells decreases. In addition, after TiCl4 treatment, the flatband potential and the open circuit voltage of corresponding solar cells were not obviously changed. All this suggests that the flatband potential of nanoporous TiO2 electrode can reflect the changing trend of open circuit voltage of solar cells well.