The 32-year-old Toth surged ahead after opening up an early lead in the gruelling event to win in a time of three hours, 40 minutes and 32 seconds on a hot and humid morning in the Chinese capital.
Toth finished almost two minutes clear of his nearest rival, crossing the finish line at Beijing’s national stadium with the Slovakian national flag raised over his shoulders.
“Of course, conditions were tough but my feeling was great,” Toth said in a televised interview.
“My heart-rate, my stomach, my dreams, my refreshment, everything, was under control.
“It was my race, it was my pace, it’s must easier to do your own race. I felt very good, without any problems, and this is the most important thing, why I won.”
Australia’s Jared Tallent, the silver medallist at the last two Olympics and bronze medallist at the previous two world championships, finished second, continuing his impressive streak of podium finishes at major events.
Tallent finished second at the 2008 and 2012 Olympics behind competitors who were subsequently found guilty of using performance enhancing drugs.
The Australian wants drug cheats named and shamed, worrying that if they go unpunished, clean competitors could unfairly be tarred with the same brush.
Angry at being beaten by athletes he believes are doping, he had stopped shaking hands with them at the end of races but happily embraced the top finishers on Saturday.
“It’s not the medal I wanted, but to be beaten by Matej, I know he’s a clean athlete so it’s not a bad result,” Tallent told reporters.
“I’m really proud of the result I got today and the Japanese guy came third. So it’s the first time in a long time in the 50 km we’ve had a clean podium.
“It’s a good day for the sport, it’s been a really good week for the sport actually. I’d hope to think that every athlete who has won a medal has worked hard for it and it’s a good positive sign in 2015 that things are starting to change.”
Tallent completed the journey in 3:42:17, his best time this season, with Japan’s Takayuki Tanii, last year’s Asian Games champion, taking the bronze medal in 3:42:55.
Hirooki Arai of Japan was fourth, ahead of Ireland’s defending champion Robert Heffernan, but no-one could catch Toth, who went into the race ranked number one in the world and dictated the pace from the outset.
“Of course, everyone expected that I am the favourite and I should win but I know that 50 km is very specific and there are very strong rivals.
“(It was only) after 30 km I started to think about winning, about the medal.”
(Writing by Julian Linden in Singapore; Editing by John O’Brien)