The rapper faces a number of other charges in Arizona
US rapper DMX has pleaded guilty to trying to buy cocaine and cannabis in Miami, his lawyer has said.
The 37-year-old singer, real name Earl Simmons, entered the plea in a Florida court and was sentenced to time served.
Mr Simmons is still in custody awaiting extradition to the state of Arizona on outstanding drug and animal cruelty charges, Bradford Cohen said.
If the rapper had not pleaded guilty, he would have had to remain in a Miami jail until an October trial date.
Mr Simmons was briefly jailed after being arrested in July on a charge of trying to buy illegal drugs from an undercover police officer, Mr Cohen said.
He was initially released on bail, but was arrested two weeks ago at a store in Miami after failing to appear in a court in Phoenix, Arizona, and subsequently denied bail.
"He got shafted on this one," said Mr Cohen, who claimed the evidence in the undercover drug operation was flawed.
The rapper had been due in Maricopa County Superior Court earlier this month to face charges relating to a May raid on his home in Arizona.
He was arrested on suspicion of drug possession and animal cruelty when 12 dogs - allegedly neglected - were found at his home.
Authorities also allege that dog carcasses were found there.
Police also seized illegal drugs and several weapons.
The rapper has sold more than 20 million albums worldwide, with his first five topping the US chart in their first week of release.