Abdelaziz Ahanfouf put Duisburg in front from the penalty spot in the 40th minute before Hasan Salihamidzic leveled the score in the 60th minute.
Roy Makaay grabbed the lead for the Bavarians in the 71st minute and Claudio Pizarro ensured the win nine minutes later.
Bayern are on top of the league table with 65 points while Duisburg are second from bottom with 21 points.
Elsewhere, Hamburg's title hopes suffered a setback after a 4-2 home defeat to Borussia Dortmund.
Ebi Smolarek broke the deadlock in the 25th minute before Benjamin Lauth equalized for Hamburg in the 35th minute.
Ailton scored his first goal for Hamburg in the 66th minute to put them ahead but Czech international Tomas Rosicky leveled the score just two minutes later.
Two strikes by Florian Kringe and Rosicky in the 83rd and 90th minutes sealed the victory for Dortmund.
Hamburg are in second place with 56 points, nine adrift of leaders Bayern.
In other matches, Cologne tied Eintracht Frankfurt 1-1, Werder Bremen thrashed Hannover 5-0, Schalke were held to a 2-2 draw with Wolfsburg and Mainz tied Hertha Berlin 2-2.