Ibrahimovic hit the post with a close-range header in the first period but made amends seven minutes into the second-half, side-footing home Kim Kallström's cross from six yards out to give Sweden the lead.
However, just minutes later, Shevchenko lost Olof Mellberg to head home Andriy Yarmolenko's cross and worst was to come for Sweden as the former AC Milan striker stole ahead of Zlatan Ibrahimovic at a corner to head past Andreas Isaksson.
Substitute Johan Elmander should have scored when he was put through by Ibrahimovic but blazed over and then in the last moment, Olof Mellberg almost scored a dramatic equaliser but his far post volley ended up on the roof of the net. Elmander on Tuesday said that it was his decision for him to start on the substitutes bench.
Sweden's coach Erik Hamren accused his team of playing like "cowards" in the first half when Ukraine enjoyed large periods of possession.
"We needed 11 players on top form together because we're not that big a team," he said. "But only five or six showed the quality I want and that's not enough," he told the media.
"We didn't reach our level until the last 20 minutes and it's my responsibility as a coach. We didn't show the courage and didn't get as much from the players as I felt we should get. We were cowards in the first-half."
Sweden now must beat England on Friday to have any chance of going through to the quarter-finals. England drew 1-1 with France.