The insertion and diffusion energies of oxygen in presence of vacancies in nickel are studied by using the first-principle projector augmented waves (PAW). When the oxygen atom is located in a substitution site, the formation of a vacancy-oxygen pair is observed. Furthermore, we show that the formation of divacancies allows the oxygen atom to migrate more easily in the metal. A model for the migration process of the three-defect system is proposed. Finally, thermal expansion effects are included in our study; it is shown that temperature effects emphasize the diffusion.