The sides were surprisingly well-matched until San Marino defender Davide Simoncini was sent off for a second bookable offence early in the second half.
Sweden were ahead 10 minutes later through Kim Kallstrom and never looked back as Christian Wilhelmsson scored a brace and Martin Olsson and Tobias Hysen grabbed a goal each.
The visitors did create more chances in the first half but rarely did they test Federico Valentini in the San Marino goal.
Captain Zlatan Ibrahimovic's long-range effort after 26 minutes was well saved by Valentini, who was also equal to John Elmander's shot five minutes before the break.
Simoncini was sent off seven minutes into the second half and Sweden quickly took full advantage of their extra man.
Sunderland midfielder Sebastian Larsson came close to opening the scoring after 58 minutes but his effort was well saved. The visitors did not have to wait long to break the deadlock, however, as Kallstrom coolly finished from the edge of the box four minutes later.
Wilhelmsson doubled the lead in the 70th minute with a smart finish and it was 3-0 10 minutes later when Olsson converted Ibrahimovic's pass.
Gothenburg's Hysen scored the fourth late on before Wilhelmsson netted his second of the night in injury time after some good work by Mikael Lustig.
The win keeps Sweden in second place in Group E, six points behind leaders Holland and level on points with third-placed Hungary, who have played a game more.