Described as a career criminal with more than 30 convictions, the man pictured was, in fact, an Auckland social worker.
The reporter who wrote the story, Ric Oram, was present when the photo was taken but admitted he had not later checked that the photographer got the right person.
The Herald sacked Mr Oram, who took a personal grievance against his dismissal to the Employment Tribunal, arguing that, although he had erred, a Herald systems failure contributed to the mistake.
The tribunal agreed and its decision was upheld by the Employment Court, which ordered that Mr Oram be reinstated.
The Herald challenged the decision in the Court of Appeal, which found the tribunal and Employment Court had erred in law.
Justice Thomas Gault said they had wrongly substituted their own views for that of the company in the technical operation of a complex business.
They should have instead concentrated on whether the decision to dismiss was arrived at reasonably.
The Court of Appeal - Justices Gault, Peter Blanchard and John McGrath - said that although the decision to sack Mr Oram for a single mistake might seem harsh, it was an avenue open to an employer who was acting fairly and reasonably.
The Herald had said Mr Oram's failure to check the photo constituted a failure to exercise appropriate care and responsibility.
The Court of Appeal said that despite Mr Oram's previously clear employment record, it had no doubt that a fair and reasonable newspaper publisher could have formed the view he had lost the confidence of his superiors.
The Herald needed to rely on reporters for the veracity of information it published, which was fundamental to its reputation.
"We are satisfied on the correct approach that dismissal was warranted."
Herald editor-in-chief Gavin Ellis said the Court of Appeal had upheld an important principle - that an employer had the right to dismiss an employee for a single act of negligence.
"If an employer follows correct procedures and in good faith arrives at a decision that dismissal for a single act is justified then the employer should be able to do so."
Mr Ellis said it was not now the case that Herald reporters faced dismissal every time they made a mistake - it was the magnitude of the mistake that mattered.
Mr Oram said yesterday that the Herald should have accepted some of the blame.
"I've always admitted I made a mistake, but if the checking systems were adequate the photo would not have been published."
Mr Oram, who had worked at the Herald since 1984, said he was not bitter but relieved "the whole saga" was over.
Andrew Little, national secretary of the Engineering, Printing and Manufacturing Union, said the court's decision should strike fear into the hearts of workers.
"This decision means that if you make a mistake you're out."
Mr Little said Mr Oram should have been treated like any other journalist who made mistakes but did not lose his or her job.
But Business New Zealand executive director Anne Knowles said the decision upheld an employer's right to decide to dismiss employees in whom it had lost trust.
It highlighted that where employers acted fairly and reasonably, and followed correct procedures, their right to manage was protected.
Ms Knowles said employers ultimately had the responsibility of ensuring they could have trust and confidence in the people they employed.
The full judgment