A drab first-half display saw Scotland - which has been guaranteed a play-off place throughout qualification thanks to its performances in the UEFA Nations League - falls behind to Baktiyor Zainutdinov's 34th-minute stunner.
However, McGinn's deflected free-kick restored parity within three minutes of the restart and the turnaround was complete when captain Naismith bundled home.
A third straight win was sealed in stoppage time - McGinn sweeping home from a low cross to add gloss to a fine second-half display from Steve Clarke's side.
Clarke made no changes from the side that claimed a 2-1 win over Cyprus on Saturday, but despite dominating possession through the first half, a low effort from Ryan Christie was the closest the hosts came to an opener.
Kazakhstan showed no such wastefulness - Zainutdinov picking out the top-left corner with a sensational, pinpoint strike that left David Marshall rooted to the spot.
Scotland came out with renewed vigour after the interval, though, and were swiftly on level terms when McGinn's powerful free-kick took a wicked deflection off Bauyrzhan Islamkhan.
James Forrest seemed set to double Scotland's tally three minutes later, only to slice wide, before Naismith blazed a close-range effort over.
Naismith made up for his miss in the 64th minute, however, taking advantage of sloppy defending from Aleksandr Marochkin to turn home a deflected cross with his shoulder.
McGinn then had the final say, getting on the end of Greg Taylor's delivery to wrap up a comfortable triumph.