PEG1000 was used as template to prepare porous TiO2 film by sol-gel method. The functions of applied potential and concentration of NaHCO3 to the photoelectrocatalytic degradation of methyl orange on porous and smooth TiO2 films were investigated. Methyl orange degradation rate has two optimal values at the applied potential of 0.8 V and 1.8 V. The addition of PEG may have negative effect on photoelectrocatalytic activity of TiO2 film. The degradation rate increases with increasing NaHCO3 concentration from 0 up to 0.05 mol/l, and then it declines after further increase of electrolyte concentration. After 100 min of reaction, the degradation rates on the films prepared without and with PEG addition are 63.78% and 65.22%, respectively.