Enrichment of nickel at the alloy/film interface and incorporation of nickel species into the anodic film have been examined for a sputtering-deposited Al–1.2at.%Ni alloy in order to assist understanding of oxygen generation in barrier anodic alumina films. Anodizing of the alloy proceeds in two stages similarly to other dilute aluminium alloys, for example Al–Cr and Al–Cu alloys, where the Gibbs free energies per equivalent for formation of alloying element oxide exceeds the value for alumina. In the first stage, a nickel-free alumina film is formed, with nickel enriching in an alloy layer, 2 nm thick, immediately beneath the anodic oxide film. In the second stage, nickel atoms are oxidized together with aluminium, with oxygen generation forming gas bubbles within the anodic oxide film. This stage commences after accumulation of about 5.4 × 10 15 nickel atoms cm −2 in the enriched alloy layer. Oxygen generation also occurs when a thin layer of the alloy, containing about 2.0 × 10 19 nickel atoms m −2, on electropolished aluminium, is completely anodized, contrasting with thin Al–Cr and Al–Cu alloy layers on electropolished aluminium, for which oxygen generation is essentially absent. A mechanism of oxygen generation, based on electron impurity levels of amorphous alumina and local oxide compositions, is discussed in order to explain the observations.