The two arrested men, aged 18 and 19, faced a joint charge of aggravated robbery when they appeared in Tauranga District Court yesterday.
They were remanded in custody and are due back in court on January 29.
Detectives have asked for the public's help to identify two other men who were in the taxi and fled afterwards.
Detective Sergeant Iain Chapman said the Tauranga Mount Taxis driver picked up four men from Welcome Bay shops and drove them to Ohauiti Rd.
At their destination, he was allegedly put in a headlock and attacked by the front-seat passenger and another man who was seated behind him.
"Their intent was to steal cash from the cab and they also ended up with the driver's cellphone, so coupled with the fact that it was a very vicious assault, the men were charged with aggravated robbery," Mr Chapman said.
"The driver suffered extensive bruising and scratches from this vicious, over-the-top assault.
"The offenders used their fists and elbows ... and the violence they showed was absolutely unnecessary. You could count the blows on this man's body. There was an excess of 15 punches to his head."
Despite continuing to be hit, the driver managed to get out of the taxi and screamed, Mr Chapman said.
"That alerted the neighbours because the assault happened in a residential street, and the neighbours came out to his aid."
As the men tried to run off, the neighbours managed to grab one of the alleged offenders and restrained him until police arrived.
Another man was arrested a short time later after being tracked and caught by a dog handler, Mr Chapman said.
The other two men fled and police have released CCTV footage from inside the taxi of one of them.
Mr Chapman said it was not believed this person physically took part in the assault but police want to speak to him as he was part of the group.
Police praised the efforts of local residents who came to the victim's aid.
"Although we never want the public to put themselves in danger we couldn't do the job that we do without the invaluable help of people willing to stand up for what is right."
Tauranga Mount Taxis did not return calls but the attack has left the Tauranga taxi community shocked.
Anyone with any information is asked to call Iain Chapman at Tauranga police on 577 4300, or alternative ring the Crimestoppers line on 0800 555 111.