Akter Miah, 34, lashed out at the driver when he refused to take him the rest of the journey for free after he ran out of money.
Depute fiscal Alan Townsend told Aberdeen Sheriff Court the taxi driver had received a message for a fare around 8pm on May 4 from Miah.
He said: “During the taxi journey the accused indicates he only has £8 which isn’t enough for the full journey.
“The accused then tries to persuade the taxi driver to take him the rest of the way into the town centre for free.
“The taxi driver indicates he can’t do that, pulls over and asks the accused to get out.
“The accused then becomes aggressive. He’s described as being in the driver’s face.
“The taxi driver calls 999 and presses the panic button on his radio and gets out of the car to try to flag down a passing police car and he’s struck in the chest area by the accused and then punched to the head.
“And then he’s subsequently grabbed and scratched.”
Mr Townsend added the driver’s colleague, responding to the panic button, arrived to find both men on the ground and helped to restrain Miah, who was shouting and swearing.
Miah, of School Drive, Aberdeen, pled guilty to behaving in a threatening or abusive manner and to assault to injury.
Defence agent Laura Gracie said: “He tells me he had lost all his bank cards on the day and had only £8.
“He was supposed to go for an interview at an Indian restaurant.
“He tells me he thought it would be £8 but when it became apparent it would be more than that he explained to the driver the position he was in.
“He became more and more irate because the taxi driver would not take him to a main street.
“When they pulled over on Great Northern Road he did not know where he was.”
She added: “Clearly he missed the interview because he was in custody.”
Sheriff Philip Mann deferred sentence until July for reports.