Enhanced photoelectrochemical (PEC) performances of Ga2O3 and GaN nanowires (NWs) grown in situ from GaN were demonstrated. The PEC conversion efficiencies of Ga2O3 and GaN NWs have been shown to be 0.906% and 1.09% respectively, in contrast to their 0.581% GaN thin film counterpart under similar experimental conditions. A low crystallinity buffer layer between the grown NWs and the substrate was found to be detrimental to the PEC performance, but the layer can be avoided at suitable growth conditions. A band bending at the surface of the GaN NWs generates an electric field that drives the photogenerated electrons and holes away from each other, preventing recombination, and was found to be responsible for the enhanced PEC performance. The enhanced PEC efficiency of the Ga2O3 NWs is aided by the optical absorption through a defect band centered 3.3 eV above the valence band of Ga2O3. These findings are believed to have opened up possibilities for enabling visible absorption, either by tailoring ion doping into wide bandgap Ga2O3 NWs, or by incorporation of indium to form InGaN NWs.