Guterres visited the Al Noor Mosque in the southern city of Christchurch, where a gunman killed more than 40 people on March 15 in one of the attacks on two mosques that killed a total of 51 people.
An Australian man, a suspected white supremacist, has been charged with multiple counts of murder and attempted murder over the attacks.
“Hate speech is spreading and public discourse is being coarsened,” Guterres said in a speech outside the mosque, Reuters reported.
“Social media is being exploited as a platform for bigotry. We must all show solidarity in response to this dangerous upsurge in hatred.”
Guterres has asked the United Nations’ special adviser for the prevention of genocide to form a team to develop a global plan of action against hate speech, he added.
The UN chief’s visit to the island nation came as its Prime Minister Jacinda Ardern prepared to co-host a meeting in France for global support to combat online expression of violence.
Guterres usually makes a “visit of solidarity” to a Muslim nation during the annual holy month of Ramadan, which began on May 5, but decided to visit New Zealand in light of the shootings, he added.