The Deep Ocean Assessment and Reporting of Tsunami (DART) buoy had been drifting since December.
It is believed to have broken free from its mooring due to an intense storm.
It was located 250 nautical miles southeast of Tonga.
The HMNZS Aotearoa was tasked by the National Maritime Coordination Centre (NMCC) to retrieve the 2.5m by 2m buoy, which weighs just over a tonne, while on its way back to New Zealand following three weeks exercising with the Royal Australian Navy.
The buoy, which is part of a network of tsunami monitoring and detection technology, was located on Wednesday and a rigid hull inflatable boat crew were deployed to secure it in preparation for it coming aboard.
It was lifted aboard with the ship’s crane.
The recovery took four hours.
Roger Ball, the acting director of Civil Defence Emergency Management, said they appreciated the Navy’s assistance in retrieving the buoy.
“We are very grateful for the assistance of the Navy and the professionalism of officers and crew on Aotearoa in diverting the 2200 nautical miles to retrieve the buoy and bring it home,” he said.
Aotearoa is designed to undertake a “wide range of tasks”, but this was a first, according to the Royal New Zealand Navy Maritime Component Commander Commodore Mat Williams.
“As the Navy’s new maritime sustainment vessel, Aotearoa was designed to undertake a wide range of tasks,” he said.
“These include refuelling ships and helicopters, transporting equipment and supplies, assisting government agency partners in their scientific and research work as well as helping in Humanitarian Aid and Disaster Relief efforts.
“Now we can add retrieval of tsunami buoys to that ever-growing list.”
NMCC director Paul Smith applauded the successful retrieval, which is an example of the support the New Zealand Defence Force provides civilian agencies.
The buoy would be returned to New Zealand following the ship’s mandatory 14-day quarantine period at sea.