EXCLUSIVE

DMX is going back to jail -- he was taken into custody in a Manhattan court Tuesday morning for failing drug tests ... a violation of his probation in his tax evasion case.

We're told the judge ruled X was a flight risk after testing positive for opiates, cocaine and oxycodone.

As we reported ... DMX was supposed to be completing rehab while he was out on bail in his tax evasion case. He'd been given some leeway to travel for performances as of late.

Play video content TMZ.com

U.S. Attorney Spokesman Nicholas Biase says prosecutors referenced the video TMZ got of DMX last week. Something definitely seemed off as he preached in a St. Louis airport bar. Witnesses said he was drinking and buying shots for other patrons. Boozing is also a probation violation.

DMX's attorney, Murray Richman, told us, "I'm saddened and disappointed. We'll have to deal with it accordingly." He added he'll try to get X back into a rehab program. He's set to be sentenced in March.