The semi-infinite XY spin chain with an impurity at the boundary has been chosen as a prototype of interacting many-body systems to test for non-ergodic behavior. The model is exactly solvable in analytic way in the thermodynamic limit, where energy eigenstates and the spectrum are obtained in closed form. In addition of a continuous band, localized states may split off from the continuum, for some values of the impurity parameters. In the next step, after the preparation of an arbitrary non-equilibrium state, we observe the time evolution of the site magnetization. Relaxation properties are described by the long-time behavior, which is estimated using the stationary phase method. Absence of localized states defines an ergodic region in parameter space, where the system relaxes to a homogeneous magnetization. Out of this region, impurity levels split from the band, and localization phenomena may lead to non-ergodicity. a