Spurred by the decreased availability of fossil fuels and global warming, the idea of converting solar energy into clean fuels has been widely recognized. Hydrogen produced by photoelectrochemical water splitting using sunlight could provide a carbon dioxide lean fuel as an alternative to fossil fuels. A major challenge in photoelectrochemical water splitting is to develop an efficient photoanode that can stably oxidize water into oxygen. Here we report an efficient and stable photoanode that couples an active barium-doped tantalum nitride nanostructure with a stable cobalt phosphate co-catalyst. The effect of barium doping on the photoelectrochemical activity of the photoanode is investigated. The photoanode yields a maximum solar energy conversion efficiency of 1.5%, which is more than three times higher than that of state-of-the-art single-photon photoanodes. Further, stoichiometric oxygen and hydrogen are stably produced on the photoanode and the counter electrode with Faraday efficiency of almost unity for 100 min.