Mathieu Valbuena provided the finishing touch to a dramatic, action-packed first half by putting Les Bleus in front, but Thomas Muller and Sami Khedira turned the tables in the second 45 minutes as Germany started the year with a win.
The entertainment level in the Stade de France started high and never subsided with both nations keen on attacking. Germany's Real Madrid midfielder Mesut Ozil had the first big chance of the game in the sixth minute, but he was denied in a one-on-one situation by Hugo Lloris.
Lloris was the busier of the two goalkeepers as Germany were more incisive with their attacks, and he made a good save to push a header from Per Mertesacker behind in the 21st minute.
France lacked precision with their attacks and Valbuena missed the target in the 27th minute before Rene Adler passed his first test of the night by denying Karim Benzema.
Benzema left Adler no chance with a free-kick in the 44th minute, but the woodwork came to the Hamburg goalkeeper's rescue, although he was beaten on the rebound as Moussa Sissoko headed the ball across to Valbuena, who nodded it in from close range to give the hosts the lead just before the break.
Germany levelled early in the second half with Bayern Munich forward Muller picking his spot in the far corner after good work by Ilkay Gundogan.
Franck Ribery went within a hair's breadth of putting the French in front again in the 68th minute before he set up Benzema, whose shot was blocked by Muller in the 73rd minute.
Germany then raced up to the other end to take the lead. Ozil slid the ball through to his Madrid team-mate Khedira, who took a touch before poking the ball into the far corner as Lloris raced off his goal to meet him.
It was also Germany's first win over France in over 25 years, although it was only sealed after the linesman's flag was raised at the other end to deny France an equaliser through Olivier Giroud in the last minute.