Derek Dixon (21) was jailed for a month and banned from driving for 10 years after a judge was told he was already under a disqualification at the time.
He had taken the bike to a chemist to get medication for a friend's father when gardai approached and he "panicked".
Dixon, with an address at Belcamp Gardens, Priorswood, pleaded guilty to dangerous and uninsured driving at the Darndale Belcamp Centre, Darndale, on July 16 last. He also admitted a charge of possession of cannabis resin.
Judge Ann Watkin sentenced him to four months imprisonment, with three suspended. She also banned him from driving for 10 years.
Garda Selina Proudfoot told Dublin District Court she had seen the accused driving the motorbike on the day and approached him with the intention of demanding to see his documents.
Dixon jumped on to the bike without a helmet on and drove off at speed. He lost control of the motorbike and collided with a bin that had been cemented into the ground.
The crash caused the bin to be uprooted from the ground. When arrested and searched the defendant was found to be in possession of €50 worth of cannabis.
Judge Watkin remarked that the accused caused "more damage to himself" by driving dangerously in an attempt to get away from the gardai.
However, she said, he "could have killed somebody else".