A p-n junction photoanode has been fabricated by depositing p-type NiO nanoparticles on the n-type hematite thin film. Such a photoanode is employed for a photoelectrochemical cell. NiO not only facilitates the extraction of accumulated holes from hematite via the p-n junction, but also lowers the barrier for oxygen evolution reaction.