MgO is a promising gate dielectric and surface passivation film for GaN/AlGaN transistors, but little is known of the band offsets in the MgO/AlN system. X-ray photoelectron spectroscopy was used to measure the energy discontinuity in the valence band (Delta E-v) of MgO/AlN heterostructures. A value of Delta E-v=0.22 +/- 0.08 eV was obtained. Given the experimental band gap of 7.83 eV for MgO, a type-I heterojunction with a conduction band offset of similar to 1.45 eV is found. The accurate determination of the valence and conduction band offsets is important for use of III-N alloys based electronic devices.