After the first game between the two sides ended 4-4, the pair put on another entertaining clash on Tuesday.
Germany finishes Group C unbeaten but had to come from behind to do so, with Tobias Hysen and Alexander Kacaniklic putting the home side ahead within 42 minutes. However, Mesut Ozil pulled one back for the visiting side prior to the break before early second-half goals from Mario Gotze and Schurrle put Germany ahead.
While Hysen's second briefly turned up the heat on Joachim Low's men, Schurrle completed his treble to gain revenge on Sweden - which is the only team to take points off Germany in qualification after the 4-4 draw in the first meeting between the sides.
Sweden's main changes were in the forward line, with Ola Toivonen and Hysen replacing Zlatan Ibrahimovic, who was suspended, and Johan Elmander up front. Joachim Low had made no secret of his desire to experiment with Germany's lineup and he made two changes. Mats Hummels came in for Per Mertesacker in defense while Max Kruse replaced Sami Khedira.
Bastian Schweinsteiger won his 100th cap while Kruse's inclusion saw Ozil drop into a deeper role than during Friday's 3-0 win over Republic of Ireland.
The home side took the lead when Hysen coolly slotted home after just six minutes as Germany conceded a goal in the opening 45 minutes for the first time in qualification. The forward latched on to a Sebastian Larsson through ball, which Toivonen did well to steer clear of, before side footing the ball past the onrushing Manuel Neuer.
Thomas Muller saw his header bounce back off the crossbar five minutes later as Germany applied plenty of pressure in an attempt to get back on level terms. However, Low's men were frustrated by a resolute Sweden defense, and did not threaten again until Schweinsteiger curled an effort over seven minutes before the break.
Sweden doubled the lead through Kacaniklic when he converted from inside the area, with the Fulham striker timing his run well to stay onside and fire home past Neuer from Kim Kallstrom's lofted ball.
On the stroke of halftime, Ozil marked his 25th birthday with a goal, pulling one back for the visitors when his right-footed effort left Johan Wiland with no chance.
Germany was level soon after the break, courtesy of a curled finish from substitute Gotze. The Bayern Munich midfielder bent his right foot around the ball in the box, after good work from Ozil to set up the chance, to restore parity eight minutes into the second half.
Schurrle put Germany ahead for the first time in the match when he latched on to a mistake from Per Nilsson, three minutes short of the hour mark.
Germany capitalized on another Sweden mistake to move two goals clear nine minutes later. Gotze kept posession well after Mikael Antonsson lost the ball, playing in Schurrle, who kept his composure to complete a brace.
Still the goals continued, with Hysen emphatically crashing home a Larsson free kick from the left after 69 minutes before Germany hit back as Schurrle completed his hat trick. He cut onto his right foot before curling an effort past a helpless Wiland 14 minutes from time to cap off a superb performance.