DMX tells TMZ, he has finally kicked the drug addictions that kept him behind bars for years — and he has his children to thank.

X tellsays, coke was his greatest demon after his latest prison release in July — "Everyone was taking advantage of me with my finances, trying to put me in the direction to fail. I have 10 kids. I have to drive them in the right direction, so I let the cocaine go."

The rapper  says God also helped him through … saying, "I am on a spiritual road to do right in my life. I am leaving out all negativity and going to stay on the right road to positive."

X's pastor says, "When [DMX] first came to my church he looked broken, sad, and full of struggle. Now you see a dramatic change. You see that the drugs and alcohol aren’t in his life."

Check out DMX on the BET Awards below: