The thermal entanglement of a two-qubit anisotropic Heisenberg XXZ chain with Dzyaloshinskii-Moriya (DM) interaction in an inhomogeneous magnetic field was studied in detail. The effects of the DM parameter, external magnetic field (B), a parameter b which controls the inhomogeneity of B and the bilinear interaction parameters J(x) = J(y) not equal J(z) (the anisotropic case) on the concurrence (C) was formulated and studied in detail. The behaviors of the concurrences for the cases between (J = J(z) = 1) and (J = -1,J(z) = 1) and, (J = J(z) = -1) and (J = 1,J(z) = -1) at the ground state and at the thermal equilibrium are exactly the same. It was found that for the antiferromagnetic (AFM) case the entanglements persist to higher temperatures in comparison with the ferromagnetic (FM) case. In addition, the AFM case presents a special point at which the nonzero concurrences are all equal at some special temperatures. The further properties will be given in the text.