One serious problem encountered in hydrogen storage based on metal-decorated porous materials is the oxidation of metal atoms as it is irreversible due to strong oxygen-binding and blocks the adsorption of molecular hydrogen. We study the adsorption of molecular oxygen on graphyne decorated with alkali (AM) and alkali earth metals (AEM) using first-principles calculations. For comparison, we also calculate the adsorption characteristics of metal atoms and subsequent molecular oxygen in pristine and boron-doped graphene. We find that the binding energy of molecular oxygen on AM–graphyne complexes, especially Li–graphyne complex, is much smaller than that on AM in graphene or comparable to that in boron-doped graphene. We show that the binding strength of molecular oxygen is mainly affected by the center of empty p- or d-band of AM or AEM on adsorbents and by the work-function of metal-adsorbent complexes. We investigate the effect of biaxial tensile strain as a means of controlling the binding strength of molecular oxygen.