Scotland kept their Group B bandwagon rolling as James McFadden inspired a clinical victory on the counter-attack that ended Ukraine's Euro 2008 hopes.
James McFadden (left) scored one and set up the other two
Kenny Miller headed Alex McLeish's side ahead after three minutes at Hampden following a McFadden free-kick.
Seven minutes later, Lee McCulloch curled the ball home from 16 yards after another well-worked free-kick.
Andriy Shevchenko blasted a reply before half-time, but McFadden drilled in after 68 minutes to ensure victory.
It meant that the Scots had won six games in a row for the first time since 1949.
Yet McLeish had fielded a cautious line-up, with Miller in a lone striker's role, as he sought to keep Scotland top of their group.
Fit-again Gary Naysmith replaced Graham Alexander at left-back, while Stephen Pearson was given a central midfield role in the absence of Darren Fletcher and Paul Hartley.
Ukraine needed three points to have any hope of qualifying and coach Oleg Blokhin went with four attackers in Shevchenko, Andriy Vorobei, Andriy Voronin and Olexandr Gladkiy.
But the visitors found themselves on the back foot - and two down - within the opening 10 minutes.
Ukraine had looked calm and assured until Andriy Nesmachny lunged at Scott Brown wide on the right.
McFadden whipped the free-kick to the front post and Miller nipped across his marker and goalkeeper Olexandr Shovkovskiy to flick the ball home.
Hampden erupted again when Ferguson flighted a set-piece to an unmarked McCulloch and the midfielder curled the ball into the far corner of the net.
A frustrated Shevchenko was booked for pulling Brown back, the card ruling the Chelsea striker out of Ukraine's next qualifier against the Faroes.
But Shevchenko drew his side back into the game when he latched on to a cross by Nesmachniy that came off Stephen McManus - then Naysmith - and drilled the ball into the roof of the net from close range.
Lee McCulloch and Kenny Miller both scored against Ukraine
Ukraine squandered a chance to level when defender Volodymyr Yezersky found himself with only goalkeeper Craig Gordon to beat in front of goal but failed to gather a Voronin up and under.
There then followed three strong penalty claims, all ruled out by referee Pieter Vink.
It looked like Vorobei failed to get a touch on the ball when challenging Alan Hutton as the defender strode into the box.
Naysmith then brought Shevchenko crashing to the ground 14 yards out, although the striker appeared to have already lost control of the ball.
In the closing seconds of an exciting half, Anatoly Tymoschuk possibly just stroked the ball with his studs after McFadden took the ball past the midfielder.
McCulloch was booked for disputing the decision, ruling the Rangers player out of the midweek trip to Georgia.
And the Scotland midfielder was injured in the first exchange of the second half after coming down awkwardly on his ankle.
Voronin fired just wide from 22 yards and then forced Gordon into a nervous save from a similar distance as Ukraine continued to dominate possession.
Gladkiy headed wide from 12 yards when found unmarked and McLeish eventually brought on Christian Dailly for the toiling McCulloch after 60 minutes.
That sparked Scotland back into life and they eased their nerves and clinched the three points when McFadden collected a through ball from Hutton and drilled it past Shovkovskiy.
Scotland: Gordon, Hutton, Weir, McManus, Naysmith, Brown (Maloney 76), Ferguson, Pearson, McCulloch (Dailly 60), McFadden (O'Connor 80), Miller.
Subs Not Used: Marshall, Robson, Boyd, Alexander.
Booked: Ferguson, McCulloch, Miller, O'Connor.
Goals: Miller 4, McCulloch 10, McFadden 68.
Ukraine: Shovkovskiy, Nesmachniy, Yezerskiy, Chygrynskyy, Kucher, Gusev (Rotan 46), Tymoschuk (Shelayev 73), Gladkiy, Vorobey (Nazarenko 62), Shevchenko, Voronin.
Subs Not Used: Pyatov, Milevskiy, Gay, Grytsay.
Booked: Nesmachniy, Shevchenko, Vorobey, Rotan.
Goals: Shevchenko 24.
Ref: Pieter Vink (Netherlands)