Young Thug is pulling out all the stops to try and get out of his criminal case, and now he's accusing the cops of improper procedure to try and get the charges tossed.

On December 17, the rapper filed court documents in his drug possession case demanding evidence be thrown out, specifically all the statements he gave to cops following his arrest.

The rapper claims during his September 2017 arrest he was never read his Miranda Rights by police during his arrest, and therefore all his statements should be stricken from the record.

He also claims the initial stop of his car by police for window tint was "unlawful," and believes cops did not have probable cause to search the vehicle.

Furthermore, he scoffs at allegations he had intent to sell drugs, and claims there was no information regarding measuring paraphernalia or possession of contraband.

Back in September, a grand jury indicted the rapper with a slew of drug possession and intent to sell charges related to methamphetamine, marijuana and hydrocodone.

He was re-arrested after failing a drug test, and has since been ordered to comply with weekly drug tests and an outpatient drug treatment program.

The rapper is facing three years in the slammer, but is hoping the Miranda Rights technicality will cause the entire case to go up in smoke.