The impact of interfacial oxygen content on the band offsets of GaAs:HfO2 interfaces was investigated using the density functional theory (DFT) method. Reference potential method was used to determine the band offsets. Moreover, GW correction was utilized to find more accurate value of the valence band edge of HfO2 and hence obtain more accurate band offsets. With gradually decreasing the interfacial O content from 100% to 30% (by changing O chemical potential corresponding to varying the growth condition), the valence band offset increases from 1.06 to 3.34 eV. It is found that this increase of the valence band offsets is inversely proportional to the charge loss of interfacial Ga atoms. Specifically, less charge loss of interfacial Ga induces less charge transfer from GaAs to HfO2 side. Consequently, the less charge loss of interfacial Ga essentially leads to an increase of the valence band offsets.