He sees the weaponization of AI as "a serious danger".
"The prospect of machines that have the capacity by themselves to select and destroy targets will create enormous difficulties to avoid escalation in conflict and to guarantee that humanitarian law and human rights law are respected in the battlefield," he said.
Improvements in AI are making autonomous weapons that could recognize and attack human targets a plausible prospect in the near future.
But critics argue that autonomous weapons won't ever be able to comply with the basic rules of war -- distinguishing between soldiers and civilians, for example -- or to understand concepts like proportionality in warfare.
It's also unclear who would be accountable if autonomous weapons went wrong on the battlefield, or were hacked. And while a number of countries have called for a ban on so-called 'lethal autonomous weapons systems', this is not backed by all countries.
Speaking at the Web Summit technology conference in Lisbon, Portugal, Guterres said the message is very clear.
"Machines that have the power and the discretion to take human lives are politically unacceptable, are morally repugnant and should be banned by international law," he said.
Guterres also used his speech at the event to warn about the impact of AI on jobs and society.
"We will see an enormous amount of jobs created and an enormous amount of old jobs destroyed," he said.
"It's difficult to know which number will be bigger, but those jobs will be very different, and so we will face huge unemployment. You will face disruption in societies, and it's clear we're not prepared for that, and we're not preparing fast enough for that."
A new generation of safety nets will be needed for those left behind by the AI revolution, Guterres said.