The victim was rushed out of the water still alive but died at the scene despite efforts to save her life. Police said it appeared she had been injured by a shark.
The attack happened at Waihi Beach on North Island not far from the country’s biggest city Auckland.
Shark attacks are unusual in the country and this is thought to be the first fatality since 2013.
Local media cited witnesses as saying the woman had been swimming right in front of the lifeguard flags on Thursday.
When they heard screams, lifeguards went out by boat immediately and pulled her to shore.
Shark attack was like ‘being hit by a truck’
New Zealand police have released a statement confirming the woman was injured in the water and that she died shortly after.
Authorities were not able to immediately confirm the cause of death, but said that “indications are that she had been injured by a shark”.
Police said the death was “extremely traumatic” for those who were at the scene.
A seven-day rahui, a traditional Maori prohibition restricting access to an area, has been placed on the beach.
It is not clear what kind of shark attacked the woman, but an eyewitness reportedly claimed it was a great white, a species which is protected in the waters around New Zealand.
“Sharks are reasonably common near all Northern beaches of New Zealand, most are harmless and even species considered dangerous very rarely interact with swimmers,” shark researcher Kina Scollay told the BBC.
“My thoughts and sympathies are with the victim’s family and we need to remember that this is a real tragedy to real people. I worry that this gets lost sight of in the media scramble after such events.”
He says that while attacks are rare, there are ways to be careful about interactions that could go wrong. Among the risk factors are for instance fish feeding events or dead animals in the water.
“If a large shark approaches or is seen nearby people should stay calm, warn those nearby and calmly exit the water.”
The last recorded shark attack was in 2018 when a man was injured – but survived – at Baylys Beach.
Over the last 170 years, there have only been 13 fatal shark attacks documented in New Zealand, according to the country’s department of conservation.