Electrodeposition of ZnO nanorods on GaN-based substrates from different precursors was studied. We found that in the initial stage of the growth, triangular nanorods are formed and that they are transformed into hexagonal nanorods for longer growth time. The precursor used mainly determines the duration of the initial growth stage; i.e., slower growth along [0001] direction results in longer period for transition from triangular to hexagonal nanorod shape. Growth mechanisms of the triangular nanorods and their transformation into hexagonal nanorods are discussed.