Rooney, captain in the absence of the suspended Steven Gerrard and the injured Frank Lampard, marked the occasion by becoming his country's fifth highest scorer of all time on 31 goals.
Alex Oxlade-Chamberlain also notched his first international goal as Roy Hodgson's side found the net three times in the last 20 minutes in front of an 84,000 crowd at Wembley as San Marino wilted after frustrating England for most of the match.
The evening began badly for England when Walcott chased a fifth-minute through ball and was felled by San Marino keeper Aldo Simoncini.
After being treated for five minutes on the field, the Arsenal winger was taken to hospital for a chest scan and replaced by Tottenham Hotspur's Aaron Lennon.
Hodgson later called Simoncini's challenge "reckless". Looking at the game overall he said he was pleased with England's display even though it took them 35 minutes to make the breakthrough.
Simoncini was also involved in the incident that led to the opening goal, bringing down Welbeck before Manchester United team mate Rooney scored from the penalty spot.
"There could have been a lot more goals but certainly there was a lot of goalmouth action and there was a lot of quality passing. They were two positive aspects of the evening," Hodgson told reporters.
"The third positive aspect was in Moldova where they drew 0-0 with Ukraine. Most people expected Ukraine to win there and that of course is good news for us."
England top the group with seven points from three games, three clear of Montenegro and Poland who have played one match fewer. Ukraine are fourth on two points.
Hodgson's team travel to Poland on Tuesday for a much stiffer test than the one bottom of the table San Marino provided on Friday.
England, camped in the opposition half from the kick-off, almost went ahead when Michael Carrick smashed a long-range shot against the bar after 34 minutes and Welbeck hit the post from the rebound.
They went in front a minute later with Rooney's penalty and Welbeck quickly made it 2-0 with a clever close-range flick from a pass by Lennon.
England then had to wait until the 70th minute for Rooney to grab the third with a shot from the edge of the box.
That goal moved him ahead of Tom Finney, Nat Lofthouse and Alan Shearer in the all-time scoring list. The only players ahead of Rooney now are Bobby Charlton (49), Gary Lineker (48), Jimmy Greaves (44) and Michael Owen (40).
Welbeck added the fourth with another close-range strike before Oxlade-Chamberlain curled in the fifth goal with 13 minutes to play.
England were expected to chalk up a landslide win over the visitors who are joint bottom of FIFA's world rankings with only one victory in 115 matches and no away goals in 23 games dating back to August 2003.
San Marino repeatedly pulled nine and 10 players behind the ball and did well to keep the scoreline down, with England choosing to go through the congested middle of the field rath
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.