We study dynamical evolution of quantum discord of a two-bit anisotropic Heisenberg XYZ model in a cosine magnetic field using a quantum discord method. With the maximum entangled state $\left|\psi_{A B}\right\rangle=(1 / \sqrt{2})(|11\rangle+|00\rangle)$ as the initial state of the Heisenberg XYZ spin chain, the non-Markovian master equation is solved analytically with the non-Markovian quantum state diffusion method and the reduced density matrix of anisotropic Heisenberg XYZ is obtained; Then we bring it into the quantum discord formula to derive evolution dynamics of quantum discord of the system. It is found that as the environmental correlation coefficient γ is small, quantum discord of the system obviously shows an upward trend. It shows that the non-Markovian environment has a positive effect on the quantum discord of the system. Greater spin coupling coefficient J, JZ and cosine magnetic field intensity increase the quantum discord as well.