Two goals from Antoine Griezmann put Euro 2016 hosts France into Sunday’s final against Portugal.
France had been under pressure for much of the first half — but a penalty in the final seconds of the opening period changed the course of the game.
Germany captain Bastian Schweinsteiger was adjudged to have handled as he tried to defend a corner, and up stepped Griezmann to fire the spot kick past keeper Manuel Neuer.
With 72 minutes gone, the Atletico Madrid striker sealed France’s victory, stabbing the ball home after Neuer had flapped at a Paul Pogba cross from the left.
France started at a fierce pace in a raucous Stade Velodrome and almost took the lead when a low Griezmann effort was tipped away by the goalkeeper after six minutes.
But that close call served to spark Germany into action, and Joachim Low’s side began 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.
Can forced Hugo Lloris into a fine low save with a bouncing effort after 15 minutes, and Lloris was soon in the 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 remaining 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 Benedikt Howedes.
After Griezmann had made the breakthrough, France began the second half brightly.
Pogba threaded a pass through to Giroud, who had space to advance into the area but saw his effort cannon off a defender, and then Griezmann had a strike deflected over.
As the game approached the hour, 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 provided with his improvised finish minutes later.
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.
Draxler sent a free-kick narrowly wide before another substitute, Leroy Sane, had a prodded effort deflected past a post.
As Germany’s desperation for the goal that would offer them a lifeline grew, Howedes headed just over after having earlier whacked an effort high into the crowd.
But they could have gone three down when Griezmann, on a hat trick but with substitute Andre-Pierre Gignac waiting unmarked to his right, opted to shoot and Neuer saved.
There was still time for Lloris to make a superb save from a Kimmich header before the whistle blew to confirm France’s place in the grand finale on a memorable Marseille night.