Martin Victor Lyttelton says he went to the home of his ex-business partner intending to commit suicide, but the Crown says he instead had "murder on his mind".
Mr Lyttelton denies charges of attempted murder, causing grievous bodily harm and aggravated burglary and has gone on trial at the High Court in Auckland.
Crown prosecutor Scott McColgan said Mr Lyttelton bought the shotgun just days before the incident took place.
The 57-year-old got inside his ex-business partner Richard Ord's home and walked through the house looking for him.
When he came to a door that he couldn't open, he fired a shot through it, hitting Mr Ord's partner in the leg.
But Mr McColgan said Mr Lyttelton had not "completed his mission" and re-loaded the shotgun.
That gave Mr Ord time to get to Mr Lyttelton and the two men wrestled. During the struggle, the gun went off again. At one stage Mr Lyttelton pulled a skinning knife out but Mr Ord was able to hold him off until police arrived.
Mr McColgan said he understood Mr Lyttelton would say he only went to Mr Ord's home to take his own life but Mr McColgan said the Crown's case was that Mr Lyttelton was also going to take the life of Mr Ord.
Mr Lyttelton, who is defending himself, told the jurors that he had been suffering from depression and his mind had been clouded by a mental illness.
He had written a suicide note and he intended to carry out his suicide at Mr Ord's home.
He said he never intended to hurt Mr Ord's partner and apologised to the couple.
The court has also heard details of the break-down of the business relationship of Mr Lyttelton and Mr Ord. The pair had been business partners but their relationship turned frosty and the pair eventually wound up in court over a disagreement about who owned shares in the company.
Mr Lyttelton sent an email to another business partner months before the incident took place, saying he was under huge amounts of stress and had been contemplating suicide.
The trial before Justice Asher and a jury has been set down for three weeks.