McGinn hat-trick helps Scotland hammer San Marino
Aston Villa midfielder McGinn scored three times in the first half in torrential rain at Hampden Park.
Lawrence Shankland and Stuart Findlay both grabbed their first international goals during the second half.
Stuart Armstrong made it six in the closing stages of a match that was in danger of being abandoned as the ball held up with every pass in the dismal conditions.
A domestic match would unquestionably have been abandoned in similar circumstances but neither team nor the French match officials were looking to try again 24 hours later, as UEFA rules dictate.
While there was a limit to what can be taken from beating the world's lowest-ranked team, Steve Clarke's beleaguered side did move up to fourth spot in Group I after ending a run of four successive defeats.
Scotland can't qualify from the group via the top two but they have a second chance to reach Euro 2020 in the play-offs in March after winning their Nations League group.
Clarke made six changes following Thursday's 4-0 defeat in Russia, but it was the limp challenge provided by San Marino that was most instrumental in Scotland's revival.
The opening goal arrived when McGinn got a deft touch on Ryan Christie's 12th-minute shot following Andy Robertson's diagonal ball.
McGinn's second came in the 27th minute after Scott McTominay's driven ball was palmed into his path.
The hat-trick came in first-half stoppage-time from Scotland's 13th corner.
Findlay headed Christie's delivery towards goal and McGinn turned and finished inside the six-yard box.
The conditions deteriorated badly in the early stages of the second half with simple passes soon getting stuck in the surface water.
The game was fast becoming a farce when two of Scotland's latest additions celebrated their first goals.
Shankland rolled the ball home from 12 yards after McTominay's strike cracked off the bar in the 65th minute, and Findlay headed home Christie's corner from close range two minutes later.
Armstrong benefited from a misunderstanding to round off the rout in the 87th minute.
San Marino goalkeeper Aldo Simoncini picked the ball up outside his box after Shankland appeared to be fouled in the centre circle.
The referee had waved play on though and Scotland found themselves with a free-kick 25 yards out.
Some of the San Marino players urged Scotland to give them the ball back but Armstrong showed no such generosity and curled into the top corner.