We study a generalized Anderson model that mixes two localized configurations --one formed by two degenerate doublets and the other by a triplet with single-ion anisotropy DSz2-- by means of two degenerate conduction channels. The model has been derived for a single Ni impurity embedded into an O-doped Au chain. Using the numerical renormalization group, we find a topological quantum phase transition, at a finite value Dc, between two regular Fermi liquid phases of high (low) conductance and topological number 2IL/π=0 (-1) for D<Dc (D>Dc), where IL is the well-known Luttinger integral. At finite temperature the two phases are separated by a non-Fermi liquid phase with fractional impurity entropy 21ln2 and other properties which remind those of the two-channel Kondo model.