Grant Barlow was stopped when police spotted a Vauxhall Corsa speeding, on Elder Street, at around midnight, on October 20, last year.
Prosecutor Robert Carr said officers saw something being thrown from the car before it was pulled over.
Barlow "appeared to be under the influence of something", and had clammy skin and dilated pupils, he said.
"They found a number of drugs in the car, along with deal bags," he added.
Barlow tested positive for six drugs, including cocaine, amphetamine and mephedrone, the court heard.
He failed to attend follow-up tests for drugs on October 3 and 15.
Chris Lavey, mitigating, said Barlow handed himself in at the police station.
"He has never passed a driving test," he said. "He said he had taken drugs a couple of days before. He accepts they would have had an influence on him."
He said Barlow was "trying to sort himself out" and had been doing cash-in-hand jobs.
The court heard he received a 16 week prison sentence, suspended for 12 months, in September 2018, for driving while disqualififed.
Barlow, admitted missing probation appointments, driving while unfit through drugs, and without a licence or insurance, when he appeared at Mansfield Magistrates Court, on Thursday.
District judge Andrew Meachin told him: "You have got a dreadful record."
He activated the suspended sentence and added four weeks for the driving offences, making a total of 20 weeks in prison.
Barlow was banned for three years and 16 weeks, and was ordered to pay a £115 government surcharge.