The development of clean and renewable energy sources is an extremely important issue for tackling environmental problems. To produce hydrogen, the process of water spiliting under sunlight is one of the most valuable methods for generating clean and renewable energy sources. There are various methods for doping different elements into titanium dioxide, the in-situ anodizing method was used because of singlestep process, the cost-effectiveness of the method and the availability of tools. The morphology and structure of prepared samples were investigated by FE-SEM, XRD and EDX techniques. The presence of iron and chromium elements in nanotubes and the reduction of band gap were confirmed. Then, the effect of doping agent concentration on the photoelectrocatalytic activity of titanium dioxide was evaluated by OCP and CA techniques. The results indicated that nanotubes doped with chromium and iron show better photocatalytic performance than titanium dioxide nanotubes. In sample T4, was selected as the optimal condition due to better response to the mentioned tests. In the following, Effect of doping on (111), (101) and (100) of TiO2 nanosheets have been studied using the density functional theory (DFT). In the Theoretical part, the effect of doping Pb and Sn elements instead of Ti atoms on TiO2 nanosheets was investigated. Energy change of valance (VB) and conduction band (CB) energy edges were examined.