Khaleel Hart demanded £80 from the driver after being dropped off in Maple Road, Wrens Nest, Dudley, on February 1 this year.
Police were alerted to the robbery and within an hour they were able to trace the 22-year-old robber to the Station Hotel, in Castle Hill.
When they arrived, police said Hart became aggressive and assaulted four officers before he was taken into custody.
Detective Constable Dave Laver, of West Midlands Police, said: "This was a horrifying experience for the taxi driver while going about his normal line of work.
"You can’t underestimate the distress of being threatened with a knife and he showed a lot of composure to call us soon after.
"Officers were able to quickly establish where Hart may be and were able to arrest him within an hour.
"We remain committed to tackling crime involving weapons and this substantial sentence should serve as a strong warning about the risks of carrying a weapon.
"He showed a complete disregard for officers with his violent behaviour against those who seek to protect the public and uphold the law."
Hart, of no fixed address, was convicted of robbery at Wolverhampton Crown Court last Thursday.
He has also sentenced to four months for the assaults at a previous hearing.