Harting, also the Olympic and European champion and world runner-up in 2007, has been the most consistent performer all season but with Malachowski the only man to break 70 metres this year it was always likely to be close.
The German set the early pace with a 68.13-metre second throw then, after clattering his third into the cage, launched his gold-winning fourth.
Malachowski responded strongly but his 68.36 was not enough and Harting, with the title in the bag, sent his final throw 68.08. Former world and Olympic champion Gerd Kanter of Estonia took the bronze with 65.19.
Harting then toyed with a mass of photographers waiting for his now-trademark celebration and duly delivered by ripping off his vest before starting his lap of honour.
(Editing by Ed Osmond)
