In this investigation, a new, facile, low cost and environmental-friendly method was introduced to fabricate N- and C-modified TiO2 nanotube arrays by immersing the as-anodized TiO2 nanotube arrays (TNTAs) in a urea aqueous solution with mechanical agitation for a short time and keeping the TNTAs immersed in the solution for 6 h at room temperature. Then, the TNTAs were annealed at different temperatures. The produced N-, C-modified TNTAs were characterized using FESEM, EDX, XRD, XPS, UV-Vis diffuse reflectance spectra. Modified optical properties with narrow band gap energy, E-g, of 2.65 eV was obtained after annealing the modified TNTAs at 550 degrees C. Modified TNTAs showed enhanced photoelectochemical performance. Photoconversion efficiency (PCE) was increased from 4.35% for pristine (unmodified) TNTAs to 5.18% for modified TNTAs, an increase of 19%. Effect of nanotubes length of modified TNTAs on photoelectrochemical performance was also studied. Photocurrent density and PCE were increased by increasing nanotube length with a maximum PCE of 6.38% for nanotube length of 55 mu m. This high PCE value was attributed to: band gap reduction due to C- and N-modification of TNTAs surface, increased surface area of long TNTAs compared with short TNTAs, investigated in previous studies.