Rapper DMX performs during week five of the BIG3 three on three basketball league at UIC Pavilion on July 23, 2017 in Chicago, Illinois.

Rapper DMX performs during week five of the BIG3 three on three basketball league at UIC Pavilion on July 23, 2017 in Chicago, Illinois.

*The judge who ordered DMX to home confinement after the rapper failed repeated drug tests has lifted the ban so that the rapper may enter rehab.

According to the New York Daily News, a court filing indicates that DMX is entering an inpatient rehab program.

Manhattan Federal Judge Jed Rakoff had ordered him to home confinement after the rapper tested positive for cocaine and pot several times while out on bail for his federal tax fraud case.

Shortly thereafter, DMX asked Rakoff for approval to travel for work.

On Friday, Rakoff decided that the artist could travel to Atlanta for a gig, as long as he was accompanied by a sober coach at all times. But that Atlanta show fell through.

DMX has since decided to enter an inpatient substance-abuse program, according to his lawyer, Murray Richman.

“This is a voluntary move on his part,” Richman told the Daily News.

Rakoff signed off on DMX entering the program in an order issued Tuesday (Aug. 22).

The court filing indicates that pretrial services — which supervises DMX while he’s out on bail — has approved the plan, and that prosecutors haven’t opposed it.