We have performed first-principles density-functional projector augmented-wave calculations to investigate the energetics of Mg and B adsorption on polar zinc oxide ͑ZnO͒ surfaces, thereby to understand the origin of the peculiar affinities between an epitaxial MgB 2 film and the ZnO substrate. We found that the ͑0001͒ Zn surface is relatively inert, while the ͑0001͒ O surface is very reactive in the adsorption of atomic species, where a triplaner BO 3 ͑a hump of MgO 3 ͒ binding unit is formed as a consequence of the B ͑Mg͒ atom adsorption on the surface. These binding units would be formed at an early stage in the epitaxial growth of MgB 2 film on the ZnO substrate, and subsequently lead to the formation of the reaction products that were recently found in the interface between the MgB 2 film and the ZnO substrate.