We show how defects in a spin chain described by the XXZ model may be used to generate entangled states, such as Bell and W states, and how to maintain them with high fidelity. In the presence of several excitations, we also discuss how the anisotropy of the system may be combined with defects to effectively assist in the creation of the desired states.