The quake was felt in Wellington during a session of parliament, prompting lawmakers to stop deliberations and seek refuge as a precaution.
There was no tsunami threat and the quake was not strongly felt in Auckland, where the touring royals continued with a public walkabout on the city's waterfront.
Reporters travelling with the couple said they did not feel any tremors during the quake, which the US Geological Survey (USGS) gave a magnitude of 6.1.
New Zealand's official GeoNet seismic monitoring service said a 6.2 quake struck at a depth of 207 kilometres (128 miles) in the central North Island about 340 kilometres northeast of Wellington.
Prime Minister Jacinda Ardern said it was widely felt across the centre of the country, despite the depth of the epicentre, and urged Kiwis to "check on those around you".
Civil Defence Minister Kris Faafoi said there had been no reports of damage or injuries.
"I think some people might be a little nervy and that's understandable but it's just a case of following those safety messages and being prepared," he told reporters.
"I think if there was anything major we'd know by now."
Faafoi said proceedings in parliament house were temporarily suspended because of heavy shaking in the building.
"We all felt it in the house, I was in there at the time... and just for the immediate safety of those in the house (the speaker) saw fit to suspend proceedings," he said.
"I think that was the wise thing to do as we felt it quite heavily."
New Zealand lies on the boundary of the Australian and Pacific tectonic plates, which form part of the so-called "Ring of Fire", and experiences up to 15,000 tremors a year.
A shallow 6.3 quake in the South Island city of Christchurch killed 185 people in 2011, while a 7.8 shake slightly further north in 2016 was the second strongest ever recorded in the country.