Solar water splitting is one of the key steps in artificial photosynthesis for future carbon-neutral, storable and sustainable source of energy. Here we show that one of the major obstacles for achieving efficient and stable overall water splitting over the emerging nanostructured photocatalyst is directly related to the uncontrolled surface charge properties. By tuning the Fermi level on the nonpolar surfaces of gallium nitride nanowire arrays, we demonstrate that the quantum efficiency can be enhanced by more than two orders of magnitude. The internal quantum efficiency and activity on p-type gallium nitride nanowires can reach ~51% and ~4.0 mol hydrogen h(-1) g(-1), respectively. The nanowires remain virtually unchanged after over 50,000 μmol gas (hydrogen and oxygen) is produced, which is more than 10,000 times the amount of photocatalyst itself (~4.6 μmol). The essential role of Fermi-level tuning in balancing redox reactions and in enhancing the efficiency and stability is also elucidated.