Governor-General Lieutenant General Sir Jerry Mateparae and Defence Minister Jonathan Coleman were among about 400 people who packed Te Terai o Rahiri Marae for the funeral.
Defence Force Chief Lieutenant General Rhys Jones and the commanding officer of the 1st battalion of the Royal New Zealand Infantry Regiment in which Corporal Hughes served, Lieutenant Colonel Glenn King, gave eulogies to the young soldier known as Dougie, describing him as well-liked, hard-working and professional.
A military clergyman, Padre Rewi Te Kahu, who had been supporting the dead man's family since the body was brought home from Afghanistan on Saturday, officiated at the funeral, which was attended by many more top brass.
About 40 soldiers from Corporal Hughes' unit travelled from their base at Linton Camp near Palmerston North for the funeral.
Some of them carried their comrade's coffin from the marae, where they were met by a passionate haka of farewell by the others.
The flag-covered coffin was then placed on a gun carriage which, with 15 soldiers armed with rifles slow-marching in front, made its way to the Te Hepara Pai urupa almost a kilometre away from the marae.
All the other soldiers, whanau and visitors formed a long procession behind the gun carriage.
An investigation is underway into the circumstances of the soldier's death.