We investigate on how to generate maximally entangled states in systems characterized by the Hamiltonian of the XXZ model with defects. Some proposed quantum computers are described by such a model. Defects embedded in this otherwise homogeneous spin chain are used to obtain Einstein-Podolsky-Rosen and W states. It is well known that a large defect localizes an excitation on the defect site. We can then consider a few identical and large defects to create a subsystem whose eigenstates are entangled. Here, we examine the cases of one and two excitations.