He was high on methamphetamine and became agitated when the couple were pulled over by police on Mayoral Drive in central Auckland.
While they were being questioned, Ball turned the key in the ignition and said to Toleafoa: "With you babe".
He reached into the back of the car, pulled out the semi-automatic pistol, leaned around Ball and shot at the officer before telling her: "Drive."
Details of the shooting were revealed for the first time yesterday when Toleafoa was sentenced in the High Court at Auckland.
Originally charged with attempted murder, he agreed to plead guilty to a less serious charge of firing at a police officer.
Justice Mark Woolford sent him to prison for eight years and three months.
It was also revealed that soon after the shooting Toleafoa contacted his lawyer, Ron Mansfield, and said he wanted to surrender to police.
It was decided Toleafoa would meet Mr Mansfield at his office with police and surrender at a pre-arranged time. However Toleafoa was intercepted by armed officers before that meeting could happen.
Justice Woolford said Toleafoa was eligible for preventive detention - meaning he would be jailed indefinitely - based on his extensive criminal history.
But he instead opted to set a minimum term, meaning Toleafoa must stay behind bars for at least five years.
The decision was made after lengthy discussions about Toleafoa's life, criminal history and "remorse".
Crown prosecutor Kieran Raftery said Toleafoa deliberately shot at Constable A, whose name has been permanently suppressed, with reckless disregard as to whether or not the bullet struck.
"The discharge was indeed deliberate. He was confronted, he knew that he was he was acting illegally, he had with him a loaded firearm.
"He wanted to get away," Mr Raftery told the court.
"The gun was pointed directly in the face of the officer ... [the bullet] missed by millimetres. The officer realises how close he came that day. It's something Murray Toleafoa needs to realise as well."
Mr Raftery had read letters from Toleafoa to the court and the injured officer explaining his actions that day and urged Justice Woolford to treat them with caution.
In the letters Toleafoa said he had been addicted to methamphetamine since he was a teenager and that had exacerbated his offending over the years - including aggravated robbery, assaulting two police officers, wounding with intent, threatening to kill and inciting violence.
He insisted he was now dealing with his addiction.
But Mr Raftery said similar promises had been made in the past - but nothing had changed. At a 2008 sentencing for a violent crime Toleafoa also wrote to the court.
While he had been in custody, he wrote, he had been reflecting on his troubled life and drug-fuelled criminal history. He said he was ashamed and embarrassed about his actions and wanted "to do better in the future".
"You should be skeptical about how realistic those expressions are," Mr Raftery told Justice Woolford of Toleafoa's latest apology letters.
Mr Mansfield said Toleafoa accepted responsibility for the crime and was indeed remorseful.
"Certainly it was not his intention to cause injury to the officer. He simply sought to leave in the vehicle," he said.
"It was a rash decision. It was reckless. It was stupid. He has acknowledged that his past conduct has caused potential harm to the community."
Justice Woolford said he had to give Toleafoa a sentence that protected the community.
"The offending is extremely serious and could have resulted in the death or serious injury of Constable A. In addition your history of violent offending includes offending against police officers.
"I have little confidence in your professed remorse. Your offending was particularly grave and reflects a worrying escalation in your offending. The community is likely to require protection from you."
Murray Toleafoa
*Born in Samoa and emigrated to New Zealand with family aged 2.
*Became addicted to methamphetamine at age 16.
*Did not finish school and has not worked a day in his life aside from during prison stints.
*Has more that 40 previous convictions and has been to prison at least three times.
*Is in a de facto relationship with Nadia Ball and was living with her in Auckland before his arrest.
*Wants to have a family with her and study civil engineering when he is released.