A Melbourne taxi driver says he feared for his life when two passengers attacked him, took his cab and tried to run him down before crashing the vehicle into a pole.

Victoria Police said a man and woman hailed the taxi at Brunswick Street, near Johnson Street, in Fitzroy about 1:20am (AEST) on Saturday.

The driver, a father of two named Hamid, took them to a block of flats in Heidelberg Heights, but the passengers said they needed to go inside for money for the fare.

When Hamid asked them to leave something as security, the man punched him in the face repeatedly and demanded his wallet, he said.

"They started punching on my face and on my head, and he tried to kill me," Hamid said.

The driver refused to give the man his wallet and fled.

Cabbie 'in shock' as taxi driven toward him

Hamid said the man and woman then got into the taxi and drove it toward him.

"He pulled over the cab on me, and I was just trying to save myself in that time," he said.

"He was aggressive and saying many things - I couldn't remember all those things because I was in shock."

Police said the pair then crashed the taxi into a pole on Upper Heidelberg Road before fleeing.

Detective Senior Constable Brendan Riddell said he was unsure what set the pair off.

"It's quite a frightening the attack; it's quite brutal," Senior Constable Riddell said.

"The taxi driver is just trying to go about his work and has been set upon by these two offenders."

Hamid said he called emergency services and was treated by paramedics.

"I was so afraid what will happen – when I called triple-0, I was really upset, crying, I couldn't breathe in that time."

Police are searching for the alleged assailants.