Police pulled Aris Bashir's Audi A3 over in Leeds city centre on May 13 only for him to confess to the officers about his ban.
He had been driving along the A61 when he pulled into the Jet garage and was approached by the following officers and quickly identified himself.
The 26-year-old then refused to answer questions during his police interview, prosecutor Hana Ahmed told Leeds Crown Court this week.
However, records showed that he has a string of convictions, including assault and multiple drug offences, along with relevant driving convictions.
This included driving while banned and dangerous driving for which he received a ban in November last year and a 12-month jail sentence, suspended for two years, and which- put him in breach.
Bashir, of Lawrence Road, Gipton, admitted a charge of driving while disqualified for the latest incident and being in breach of a suspended sentence.
In mitigation, Matthew Stewart said Bashir entered a guilty plea at the first opportunity.
He said: "He has been full and frank and knows there is no excuse. He takes full responsibility.
"He was out of work at the time, was living with his parents and he simply needed to get out of the house.
"It was a lack of maturity and judgement."
He said that he was making changes in his life, including hopes of signing up for a plumbing and electrician's course.
Judge Neil Clark chose not to activate the suspended sentence after recognising Bashir was "making progress" in an offender management programme.
Instead, he said the suspended sentence will remain in place, and told him to undergo 15 rehabilitation days.
Judge Clark said: "People may say you should have gone straight to prison, but the continued threat of a suspended sentence is a better thing than sending you to prison.
"But it will never happen again. If you breach it again there won't be any alternative to prison. No messing about."