Christopher Davies,40, failed in an attempt to grab his victim's takings bag and was chucked out the vehicle by the driver who managed to bring it to a stop.
During a struggle with William McDonald, Davies bit the victim on the arm before the driver was able to break free and escape.
Mr McDonald opened the rear door of car, seized Davies and ejected him before getting back in and driving off.
A judge told Davies: "You pleaded guilty to attacking a vulnerable taxi driver in an attempt to rob him while you were a passenger in his taxi."
Lady Scott pointed out: "You had a belt around his neck and attempted to strangle him while he was driving."
The judge said it was "a frightening and dangerous assault" committed while Davies was freed on bail and on licence following a conviction for serious assault.
She told Davies at the High Court in Edinburgh: "You have 45 previous convictions, including serious convictions for violence and reckless conduct."
Davies had previously served nine years in jail for culpable homicide in 1996.
Lady Scott told Davies that he would have faced a seven-year prison term, but for his guilty plea.
She ordered that he be kept under supervision for a further three years.
Defence counsel Ronnie Renucci said Davies had taken a large quantity of valium and remembered very little about the offence.
He said Davies has a chronic drug problem.