The High Court in Glasgow heard that Kevin Shand, 35, was captured on CCTV wandering in a corridor and the staff room at the Malmaison Hotel in Tower Place, Edinburgh.
Police were called in after a number of thefts from the hotel of a handbag containing a purse, sunglasses, bank cards and a passport, a£750 bike and a safe..
Shand, who was seen on CCTV riding the bike away from the hotel admitted stealing the items from the hotel on May 11.
He also pleaded guilty to robbing Cashino in Leith Walk, Edinburgh, of £3,874.15 on May 15 while armed with a meat cleaver.
Shand told a member of staff: “Right, get the money.”
Prosecutor Gordon Lamont said: “The accused removed money from the safe and placing it in his jacket pocket. He also took a small grey bucket containing coins worth in the region of £500.”
Shand also admitted dangerous driving in North Fort Street, Ferry road, Madiera Street and South Fort Street, all Edinburgh, on May 16.
At one point Shand, who had three previous conviction for dangerous driving, almost collided with a police car.
He also reversed along Madiera Road at excessive speed. He managed to escape police by driving onto the pavement and over a broken bollard at West Bowling Green Street.
He also pleaded guilty to threatening staff at the underground car park at Ocean Apartments, Western Harbour Midway, Edinburgh, with a knife on May 18.
The court was told that Shand needed money to fed his drug habit and was in debt to dealers.
Jailing him Lord Boyd said: “Some of these offences arise from your drug debts and attempts to get money to pay them. I require to consider the safety of the public.”
Lord Boyd also banned Shand, who is a prisoner in Edinburgh, from driving for nine years.