Experiments found that loading suitable cocatalysts, usually in the form of metal and metal oxide nanoparticles, on the semiconductor surface can remarkably increase the photocatalytic activity of water-splitting reaction. To get insight into the mechanism of experimental observations, we took a NiOx/β-Ga2O3 photocatalytic system as a model and performed detailed density functional theory calculations. Electrochemical computational methods are used to investigate the hydrogen evolution reaction (HER) and oxygen evolution reaction (OER). Our results show that in the Ni4O2/β-Ga2O3 system, the reaction sites of HER are on cluster oxygen atoms and Ni atoms in the Ni2 cluster. Loading the Ni4O2 cluster on the β-Ga2O3 surface importantly reduces the reaction free energy of HER. On the clean β-Ga2O3 surface, water dissociation is energetically unfavorable. After attaching the Ni4O2 cluster to the surface, water decomposition becomes thermodynamically favorable. The favorable reaction sites of OER focus on the Ni4O2 cluster. The rate-determining step of OER can be changed by adsorbing the Ni4O2 cluster. Notable reduction of overpotential (0.87 V) for OER on Ni4O2/Ga2O3 is found compared with that on the clean Ga2O3 surface, which reasonably explains the experimental observation on significant enhancement of activity for generating oxygen after loading NiOx cocatalysts.