The Sky Sports commentator curled up to protect himself from the blows, the court heard.
Neilson then twice jumped in the air and landed on Marshall with both feet.
Marshall suffered bad bruising to the back, head and body, as well as lacerations, and a large contusion under the left eye.
Defence counsel Josh Lucas said Neilson only drank alcohol on "very rare occasions" and that night was one of those occasions.
Neilson's actions were borne out of drunkenness, "bad peer influences and violent tendencies", the lawyer said.
Mr Lucas said he has "misinterpreted the occasion and out of misguided loyalty tried to help out his friend".
Neilson, who now worked full-time at a minerals firm, accepted what he did was "disgraceful, idiotic", no matter who the victim was, Mr Lucas said.
Judge Tony Couch said Neilson had an extensive criminal history for serious driving offences, but none for violence.
He was especially concerned that Neilson had jumped on Marshall while on the ground, but he accepted Neilson had shown "a measure of remorse", and had expressed wishes to have a restorative justice meeting with the former sportsman.
Judge Couch sentenced him to home detention for a period of five months, which brought exclamations of relief to Neilson's supporters in public gallery.
Neilson covered his face as he left court today and refused to comment before being bundled into an awaiting car.
Neilson's co-accused Adam Kearns - the 23-year old son of the convicted killer Helen Milner, dubbed the Black Widow - has pleaded not guilty and elected a trial by jury in Invercargill.
No date has yet been set for the trial.