Both β-Ga2O3 and wurtzite AlN have wide bandgaps of 4.5–4.9 and 6.1 eV, respectively. We calculated the in-plane lattice mismatch between the (−201) plane of β-Ga2O3 and the (0002) plane of AlN, which was found to be 2.4%. This is the smallest mismatch between β-Ga2O3 and binary III-nitrides which is beneficial for the formation of a high quality β-Ga2O3/AlN heterojunction. However, the valence and conduction band offsets (VBO and CBO) at the β-Ga2O3/AlN heterojunction have not yet been identified. In this study, a very thin (less than 2 nm) β-Ga2O3 layer was deposited on an AlN/sapphire template to form the heterojunction by pulsed laser deposition. High-resolution X-ray photoelectron spectroscopy revealed the core-level (CL) binding energies of Ga 3d and Al 2p with respect to the valence band maximum in individual β-Ga2O3 and AlN layers, respectively. The separation between Ga 3d and Al 2p CLs at the β-Ga2O3/AlN interface was also measured. Eventually, the VBO was found to be −0.55 ± 0.05 eV. Consequently, a staggered-gap (type II) heterojunction with a CBO of −1.75 ± 0.05 eV was determined. The identification of the band alignment of the β-Ga2O3/AlN heterojunction could facilitate the design of optical and electronic devices based on these and related alloys.