Two officers were called to the Otaika shops as Lemon was acting in a disorderly manner.
As the officers spoke to Lemon he spat at the female officer and punched the male officer in the face and then fled.
"He was out there protecting us all, including you and as you now accept, you had no right to assault him in the way you did. You yourself had been assaulted earlier and you might have been intoxicated, but that is no excuse for assaulting a police officer," Judge McDonald said.
"The courts must do what they can to protect the thin blue line of police officers are out there doing their upmost to keep the rest of us safe."
The female officer followed Lemon down a driveway and pepper sprayed him when he turned his back on her and then jumped over a fence.
Lemon ran off towards NorthTec where he was arrested a short time later, but he declined to make a statement to police.
Before sentencing, Judge McDonald considered a cultural report, which examines an offender's culture and provides sociological reasons as to why their crime happened and how it can be prevented.
Lawyer Arthur Fairley said it was up to the judge to read the report, consider Lemon's "horrific background" and see if there was cause for a discreet discount on the jail term.
Crown lawyer Kyle McNeil said there was no nexus between Lemon's upbringing and the offence.
Judge McDonald said like so many people appearing in the courts the report made for sad reading.
"It tells me in detail about your terrible upbringing and your cultural disconnect from iwi and marae."
Lemon was badly beaten by his father as a child, was a father himself at 14, was in the Youth Court system at 15 and was jailed for the first time at the age of 18.
He had joined Black Power, but left the gang five years ago. Judge McDonald gave a two-month discount as a result of the cultural report to reach an end sentence of two years' and three months' jail.