A court heard that Mark Townsley attracted the attention of police because he was driving so slowly through the centre of Auchterarder.
Townsley, 28, then sped up but was pulled over by officers and found to be driving under the influence of drugs.
He admitted driving while unfit on 25 August last year.
Townsley, Primrose Crescent, Perth was also fined Â£400 at Perth Sheriff Court.
Depute fiscal Lisa Marshall said police officers were on patrol in the town when they noticed Townsley's Vauxhall Mokka driving at walking pace.
She said: "He was driving on the High Street at around five miles per hour, which attracted the attention of the officers. He speeded up as they went to stop him."
The court was told that Townsley passed an alcohol breath test, but had glazed eyes and slurred speech.
A motorist on drugs has been banned from the road for three years after he was caught driving along a Perthshire high street at 5mph.