"It was a total surprise, and very emotional."
Directly before the ceremony, Melloy was in a meeting with some of the boys before a planned school trip to Chile.
He said the meeting had made him run late for the ceremony, so the boys would also have had to rush to make it there on time.
Melloy has been principal of St John's for five years. He and Lorraine met while at university in Scotland, and the couple have lived in New Zealand for 24 years.
In a first for the Napier citizenship ceremony, armed police were stationed as security.
A Napier City Council spokeswoman said it was because at a national level, New Zealand remains under a high security threat.
She said unfortunately that meant events, including citizenship ceremonies, had to have a stepped-up security presence.
The ceremony was presided over by acting mayor Faye White. Councillor Annette Brosnan was MC.
The kapa haka group for William Colenso College also performed, at the start of the ceremony.