A novel fabrication route for core/sheath heterostructure CdS/TiO(2) nanotube arrays is proposed using ac electrodeposition for application in photoelectrochemical cells. The morphologies of the CdS/TiO(2) electrodes, which were prepared by electrochemically depositing CdS directly into anodic titanium nanotubes from an electrolyte containing Cd(2+) and S in dimethyl sulfoxide, were characterized by a field emission scanning electron microscope (FESEM). The deposited material was found to be in a hexagonal CdS structure by x-ray diffraction (XRD). The synthesized CdS/TiO(2) electrodes showed much higher photocurrent density in the visible wavelength region than pure TiO(2) nanotube arrays. We demonstrate that ac deposition voltage and time can control the CdS/TiO(2) composite architecture, which is crucial in determining the overall efficiency of the water-splitting reaction. The maximum photocurrent density was obtained with the core/sheath heterostructure CdS/TiO(2) nanotube arrays, which were fabricated by deposition of CdS at 5 V for 30 min with 2.5 microm tube length.