Sweden striker Zlatan Ibrahimovic's spectacular goal helped condemn France to the Group D runners-up spot and a Euro 2012 quarter-final against Spain.
France struggled to get going and Ola Toivonen went close for Sweden when his shot stuck the outside of the post.
Ibrahimovic eventually punished France when he brilliantly volleyed in from 15 yards from a Sebastian Larsson cross.
Olivier Giroud headed high for France before Larsson smashed in a close-range shot for Sweden's second.
"This is a hammer blow for France. Laurent Blanc is thinking 2010 all over again. I know they are in the quarter-finals but he doesn't fancy going in against the Spanish with this team and this attitude. There are big, big problems. It is always about attitude with the French. In the end, I think the French got away with only losing 2-0."
France's defeat allowed England, who beat Ukraine, to leapfrog them and take top spot in the group, and also saw central defender Philippe Mexes receive a yellow card meaning he is suspended for the game against Spain.
It was a first loss in 24 internationals for France and manager Laurent Blanc will not only be left to worry over a last-eight meeting with the European and world champions, but also a disappointing performance from his side.
Sweden had already been eliminated after defeats in their first two matches but they led early in the second half against both Ukraine and England before going on to lose.
Despite their exit, Sweden had given notice they were determined to finish on a high, with their players choosing to train last Sunday rather than taking up manager Erik Hamren's offer of a day off.
Les Bleus, though, did not heed the warning signs and began in a casual manner.
Sweden had two early chances with Toivonen nodding wide and Larsson heading straight at keeper Hugo Lloris.
Some uncertain Swedish defending resulted in keeper Andreas Isaksson beating away a Franck Ribery shot before Toivonen nearly stunned France.
France run ended
- The defeat means France's unbeaten 23-match run since a 1-0 home defeat to Belarus in September 2010 comes to an end. It was the longest current unbeaten run in world football.
A long ball was not dealt with by Mexes and it let in Toivonen, who rounded Lloris but hit the outside of the post from a tight angle.
Sweden's physicality was stifling the fluidity and flamboyance of the French and they were limited to long-range efforts, with one such strike from Hatem Ben Arfa going just too high.
Hamren's side were being roared on by a strong contingent of Swedish fans in Kiev and appeared determined to finally give them something to cheer.
The Swedes nearly went in front soon after half-time when substitute Christian Wilhelmsson kept the ball in wonderfully and crossed to the far post, with Lloris saving Larsson's angled shot.
But the French keeper had no chance after 54 minutes as Ibrahimovic unleashed a sublime scissor-kick volley into the bottom corner.
Wilhelmsson was causing France all sorts of problems and, after Ibrahimovic played him in, had a shot saved by the increasingly busy Lloris.
The keeper was quickly back in the thick of the action, going full stretch to tip the ball over the crossbar as Olof Mellberg flicked a shot at goal from an Ibrahimovic corner.
France finally awoke but Sweden stood firm with centre-backs Mellberg and Jonas Olsson straining every sinew as they lunged into tackles with vigour.
Giroud, linked with a move to Arsenal, put a free header wide and Sweden made sure of their first competitive win over France since 1969 when Larsson emphatically powered home a shot after Samuel Holmen's effort came off the crossbar.
Sorry, we were unable to load match stats, please try again.