The global popstar hugged her old class teacher Jenny Armitage before she took her seat on the judging panel.
She read out the winners after the 90-minute contest, with Kip Griffin who sang One More Night by Maroon 5 winning the competition.
Griffin, who was rather shy when approached by the Herald, said Lorde was his "idol".
Afterwards students swarmed Lorde afterwards, signing autographs and taking pictures.
Principal Nick Hill said staff were told about Lorde's visit only this morning, and that they were all big fans of hers.
Earlier this week the Royals singer, along with golfer Lydia Ko, topped the list of Time magazine's most influential teenagers in the world.
She also signed a publishing deal with Songs Music Publishing (SMP). The Wall Street Journal reported other publishers had made bids of US$4 million (NZ$4.9m).