Listen to DMX on iHeartRadio

(TMZ) - DMX was arrested in South Carolina last night - but immediately called BS on the cops - screaming out allegations that he was set up ... and it was all caught on tape, and TMZ has the details. 

TMZ reports, according to DMX, the cops pulled over a car he was riding in for making an illegal U-turn. During the stop, cops say they found weed in the car and put the rapper in 'cuffs.  Cops say they also noticed a warrant out for DMX stemming from a previous driving without a license case and informed him that he needed to go to jail. 

According to TMZ, X was pissed and began ranting about the situation while a female friend of his recorded the entire incident.

"This ain't no normal traffic stop," X screamed ... "18 cops, 5 cars, get the f**k outta here man."

X also claims the driver did nothing wrong - and the car should never have been pulled over in the first place. 

"It was legal ... they got nothing."

At one point, you can hear X say, "I'm sweatin' like a motherf**ker, yo."

X was eventually hauled to jail in Greer County, SC - and he's scheduled to face a judge sometime this morning. 

According to TMZ, Law enforcement sources say that X is expected to be sentenced to 15 days behind bars, but will most likely only have to serve 10, if he's a good boy. 

During the arrest, X suffered what is believed to be a slight asthma attack ... and paramedics responded to the scene to treat the rapper. Don't worry, he's fine now.

Check it out below:

Photo Credit Getty Images