EXCLUSIVE

Judge to DMX I'll Let You Off House Arrest If You Get Into a Drug Program

DMX is off house arrest with one big catch -- he's gotta check into a treatment program to get clean ... TMZ has learned.

A judge signed off this week on X entering an inpatient treatment program for substance abuse -- and as part of the deal, he'll be able to leave his house without wearing an ankle monitor.

According to the court docs, obtained by TMZ, all other bail conditions are in place for X while he's out on bond for his federal tax evasion case. He'll still have to get permission to travel out of New York state, but can travel to the facility without issue. It's unclear where the treatment program is located.

X's attorney, Murray Richman, tells us X entered rehab because his drug usage had become impossible to manage.

As we first reported ... he's already requested approval to travel for some shows, but we don't know if his treatment will affect those concert dates.

Click here for info about our online advertising practices.