The effects of the different Dzyaloshinskii—Moriya (DM) interaction on thermal entanglement of a two-qutrit Heisenberg XX spin chain in a nonuniform magnetic field are investigated. Our results imply that the x-component DM interaction plays a central role in enhancing quantum entanglement and it has a higher critical temperature than the z-component DM interaction. The entanglement can be tunable controlled by changing the multiple of the magnetic fields B1 and B2. Also we found that different DM interaction are competitive to each other in some conditions.