The effects of oxidation on the surface structure and chemical bonding states of AlGaN/GaN heterostructures were investigated using x-ray photoelectron spectroscopy (XPS). In comparing Al 2p core-level XPS spectra among as-grown and annealed samples, we found that Al atoms on the surface were highly oxidized after rapid thermal annealing (RTA) at high temperature; not only in an O2 but also in an N2 gas atmosphere. The Al oxidation level was almost identical for the samples annealed at 800 °C, irrespective of the annealing atmosphere and time; yet there was a strong dependence on the annealing temperature. The dependence of surface barrier height on the annealing condition is associated with Al oxidation behavior. Before the RTA, the barrier height increased together with the AlGaN thickness, indicating an unpinned Fermi level and the existence of low-density and distributed surface donor states. After the high-temperature RTA, however, the height is maintained at a certain value, regardless of the thickness, due to Fermi level pinning by high-density donor states. These results can be explained by the formation of two types of oxide structures providing different types of donor states.