In this study, we present theoretical X-ray absorption near-edge structure (XANES) spectra at the K-edge of oxygen in zirconia containing Ni dopant atoms and O vacancies at varying concentrations. Specifically, our model system consist of a supercell composed of a zirconia (ZrO 2 ) matrix containing two nickel dopants (2Ni), which substitute two Zr atoms at a finite separation. We found the 2Ni atoms to be most stable in a ferromagnetic configuration in the absence of oxygen vacancies. In this system, each Ni atom is surrounded by two shells of O with tetrahedral geometry, in a similar way as in bulk cubic zirconia. The oxygen K-edge XANES spectrum of this configuration shows a pre-edge peak, which is attributable to dipole transitions from O 1s to O 2p states that are hybridized with unoccupied Ni 3d states. The intensity of this pre-edge peak, however, reduces upon the introduction of a single vacancy in the 2Ni-doped zirconia matrix. The corresponding ground state remains ferromagnetic, while one of the nickel