Using nanomaterials to design and prepare photoanodes could enhance photoelectrochemical and photocathodic protection (PCP) performances. However, little is known about how the detailed nanostructure correlates with performance. Here, we report a morphologically tunable nano-ZnO semiconductor grown on a TiO2 nanotube array (ZnO/TiO2) for the PCP of nickel-coated magnesium alloy by manipulating the hydrothermal reaction temperature. While irregular ZnO nanosheet clusters were observed at relatively low and high temperatures, a smooth array of nanorods with a hexagonal cross-section structure was obtained at a moderate reaction temperature. Such nanostructure exhibited the optimum photoelectrochemical and PCP capacities, showing the highest photogenerated current density, which is 4.2 times higher than the single-component TiO2 photoanode. The apparent enhancement in the performance of the ZnO/TiO2 composite was related to the morphological regulation of the nano-ZnO and the formation of staggered gap heterojunction between ZnO and TiO2. This assessment is supported by the results from several characterizations, including a high-resolution transmission electron microscope, Mott-Schottky, and valence band X-ray photoelectron spectroscopy. These findings give a new insight into the relationship between the structure and photoelectrochemical performances of nano-ZnO, which has significant implications for designing and preparing high-efficiency photoanode in photocatalysis and corrosion protection.