Two goals from Antoine Griezmann put Euro 2016 hosts France into Sunday’s final against Portugal on a dramatic night in Marseille.
France had been under pressure for much of the first half — but a penalty in the final seconds before the break changed the game.
Germany captain Bastian Schweinsteiger was adjudged to have handled the ball as France crossed from a corner, and Griezmann stepped up to fire the spot-kick past Manuel Neuer.
And with 72 minutes gone, the Atletico Madrid man sealed the victory for France, stabbing the ball home after Neuer had flapped at a Paul Pogba cross.
France had started at a fierce pace in an crackling Stade Velodrome atmosphere, and almost took the lead after six minutes when a low Griezmann effort was tipped away by Neuer.
But that close call served to spark Germany into action, with Joachim Low’s side soon beginning to dominate possession.
Mesut Ozil started a move that ended when Joshua Kimmich’s cross was headed clear, before Emre Can set up Thomas Muller for a cross-shot that skidded past the post with nobody able to get a touch.
Can forced Hugo Lloris into a fine low save with a bouncing effort from inside the area after 15 minutes, and Lloris was in action again as he tipped Schweinsteiger’s curling strike over.
France were finding it hard to get forward, but with 10 minutes of the first half left a foul by Can on Griezmann gave them a free-kick 25 yards out — only for Pogba to curl his effort straight at Neuer.
Schweinsteiger’s appeals for a penalty as he went to ground in a crowded area were waved away before, at the other end, Griezmann hit the side-netting from an angle and Giroud saw an effort blocked by a fine Benedikt Howedes challenge.
After Griezmann had made the breakthrough, the hosts began the second half brightly.
Pogba threaded a pass through to Giroud, who had space to run into the area but saw another effort blocked, and then Griezmann had an effort deflected over.
As the game approached the hour mark, Germany suffered a major blow when defender Jerome Boateng limped off with what looked like a hamstring problem and was replaced by Shkodran Mustafi.
Laurent Koscielny headed over from a corner as France looked for the second goal that would give them some breathing space – space Griezmann then provided with his improvised finish.
Low threw World Cup final goalscorer Mario Gotze into the action for Can, with France counterpart Didier Deschamps bringing on N’Golo Kante for Payet as he looked to close out the game.
But Germany came close to reducing the arrears after 74 minutes when Kimmich hit the outside of the post with a curling effort.
Within moments, Draxler curled a free-kick narrowly wide and then another substitute, Leroy Sane, saw a prodded effort deflected just past the post.
As Germany’s desperation for a lifeline grew, Howedes headed just over and Howedes whacked an effort high over the bar.
They could have gone three down when Griezmann, on a hat-trick but with substitute Andre-Pierre Gignac waiting to his right, opted to shoot and Neuer saved.
Lloris made a superb save from Kimmich’s header — and that was that as the whistle blew to confirm France’s place in the final on a memorable night.