Sweden's Duplantis was the star on the final day, soaring to an under-20 world record of 6.05 meters. He set it at 5.95 before breaking it twice and extended his own personal best by 12 centimeters.
"I just knew I need to go higher to solve it. It was crazy and pretty tough for me as I just improved my PB," Duplantis said. "I had to switch the poles at the higher heights for the ones I have never used before in the competition."
World record holder Renaud Lavillenie of France finished with bronze after reaching 5.95 meters, behind Russian Timur Morgunov with a personal best 6 meters.
Duplantis' rivals, led by Lavillenie, were already congratulating him after he had cleared 6 meters. Duplantis had trained with Lavillenie in France and the 31-year-old shared in the young Swede's celebrations.
"What he did today was just amazing," Lavillenie said.
Asher-Smith, who had already won the women's 100 and defended her 200 title, led Britain to gold in the 4x100 relay. She overtook her Dutch and German rivals on the final straight as Britain won in a world-leading 41.88 seconds.
"I'm glad I was the last one to run, it was easy," the 22-year-old Asher-Smith said.
Britain also claimed gold in the men's 4x100, ahead of Turkey in second and the Netherlands. Germany's hopes took a tumble in the heats when Lukas Jakubczyk brought teammate Julian Reus down on the final change. Jakubczyk left the stadium with bandages around his head, arms and shoulders, while Reus injured his shoulder.
"It's bitter because we were well placed in the race," teammate Patrick Domogala said.
Gesa-Felicitas Krause delighted home fans at Berlin's Olympic Stadium by defending her 3,000 steeplechase title and claiming Germany's sixth gold.
"I really wanted to win here. I had no Plan B, only winning was in question," Krause said. "It's a wonderful feeling."
Fabienne Schlumpf of Switzerland was second, ahead of Norway's Karoline Bjerkeli Grovdal.
Dutch runner Sifan Hassan won the women's 5,000 in a championship record time of 14:46.12, and Poland's world record holder Anita Wlodarczyk won her fourth consecutive gold in the hammer throw with a championship record 78.94 meters.
Nelson Evora of Portugal won the men's triple jump, leaving Alexis Copello to settle for silver on his 33rd birthday. It was Azerbaijan's only medal of the championships.
Earlier, Volha Mazuronak of Belarus won the women's marathon in 2:26:22, while Koen Naert of Belgium ran a championship record 2:09:51 for gold in the men's.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.