Scorers: England - Rooney (48)
The Manchester United striker converted a centre from England skipper Steven Gerrard three minutes into the second half as Roy Hodgson’s side set up a last-eight meeting with Italy in Kiev.
But there was controversy when Ukraine striker Marko Devic appeared to be denied an equaliser with a shot that looked to have crossed the line before John Terry cleared.
Yevhen Konoplyanka had the first effort on goal for the home side but his 20-yard shot flew high and wide.
Ukraine had plenty of the ball in the early stages as they were roared on by the vast majority of a passionate crowd.
Rooney had his first run with the ball after six minutes but was halted by Denys Garmash’s tackle.
Garmash then tried an ambitious attempt from 30 yards out which Joe Hart had covered as it dipped over the bar.
A reverse pass from Devic, who had replaced Andriy Shevchenko in the starting line up, played in Andriy Yarmolenko but Terry was alert to the situation and tackled the midfielder before he could shoot.
England kept possession for 20-plus passes but the eventual low cross from Ashley Cole was comfortably dealt with.
Scott Parker got his body in the way of a low shot from Devic as England settled for sitting deep.
Ukraine looked relaxed given what was at stake for the co-hosts and Artem Milevskiy only just failed to get on the end of Yevhen Selin’s ball in from the left.
Terry blocked Konoplyanka’s drive and, for all Ukraine’s possession, Hart did not have to make a save to make in the opening 20 minutes.
But the Manchester City keeper was relieved when Gusev’s powerful attempt flew inches over the bar after a mistake by Ashley Young.
Then Rooney missed a great chance to put England ahead after 28 minutes.
Terry found Young in space on the left and his cross picked out the unmarked Rooney. But he appeared almost too casual in attacking the ball and directed his header wide of the target from close range.
Ukraine retaliated and produced their most decisive move up to that point two minutes later. Devic and Milevskiy combined to find Yarmolenko in space on the right of the box and, after cutting inside, his left-footed drive was held by a relieved Hart.
Devic was looking sharp and relishing the chance offered to him by Shevchenko’s injury.
England tried to take the sting out of the game with a spell of possession. But there was a sense of expectation from the home fans every time their side ventured forward.
Yarmolenko showed his quality in jinking into the England area and it needed Joleon Lescott to halt him as he prepared to shoot at the expense of a corner.
But England moved closer to the quarter-finals as Rooney put them ahead after 48 minutes. Gerrard’s corner was half-cleared but the Liverpool player received the ball back on the right flank and delivered a dipping cross.
Pyatov failed to deal with the situation and Rooney was left with the simplest of headers at the far post for his 29th goal for his country.
He is now alone as England’s eighth highest scorer and only one adrift of Alan Shearer.
It stunned the home crowd and now the England fans in the one corner of the ground could be heard celebrating especially after news came through of Sweden taking the lead against France.
Rooney broke clear of the Ukraine defence but was held up before laying the ball off to Milner who failed to make full contact on his shot.
Yarmolenko missed a great chance to level after 61 minutes when he headed over the bar from close range.
But a minute late there was controversy when a shot from Devic appeared to have crossed the line before Terry cleared the ball.
Ukraine appealed in vain in an incident which brought back memories of the disallowed goal by Frank Lampard against Germany during the 2010 World Cup.
Tymoshchuk was booked for bringing down Parker on the edge of the Ukraine box.
Pyatov did well to prevent Ashley Cole from doubling England’s lead when he turned his volley around the post.
Milner made way for Theo Walcott while the less than fully fit Shevchenko, his country’s two-goal hero against Sweden, replaced Devic.
Gerrard was booked for a foul and then the England captain was on the receiving end of a challenge from Yaroslav Rakitskiy which saw him yellow carded.
Hart was almost deceived by a swerving shot from Yevhen Konoplyanka but managed to turn it to one side. Cole was booked for time wasting as the game entered its final ten minutes.
Then Ukraine substitute Serhiy Nazarenko fired over the bar as time started to run out for his side.
Andy Carroll came on for Danny Welbeck with eight minutes remaining. Shevchenko was booked for chopping down Young before Alex Oxlade-Chamberlain came on for goal hero Rooney and England played out time to finish top of Group D.