We study the entanglement dynamics of three two-level atoms interacting with a structured reservoir. The atoms are initially prepared in a mixed W state while the reservoir is in the vacuum. We show the dependence of entanglement dynamics on the purity of initial atomic state and on the amount of non-Markovianity. When the initial state of atoms is in a W pure state, the entanglement will decay asymptotically, while it vanishes in a finite time if the initial state is in a mixed W state. In addition, as the memory effect of the environment, entanglement can partially revive after it vanishes, and the revival degree is dependent on the strength of non-Markovian effect. In the end, we consider the entanglement generation and its evolution when the initial state of the atoms system is completely separable.