Goals from Bastian Schweinsteiger, Miroslav Klose and Michael Ballack earned Joachim Löw's side a 3-2 win that sets up a final-four meeting with either Croatia or Turkey.
Nuno Gomes and Helder Postiga replied for the Portuguese but they were always trailing and, only briefly did it look like they could reclaim control of a match they had been widely expected to win.
Portugal coach Luiz Felipe Scolari's worst pre-match fears were all realised as Cristiano Ronaldo, Deco and the rest of Portugal's wonderful array of attacking talent was cruelly let down by the woeful defending and goalkeeping that contributed to two of the three German goals.
Löw said that having to watch from a box up in the stands as he was suspended had been extremely frustrating. "Sitting behind the window in the stands was really difficult," said the 48-year-old. "I was a long way from the pitch. Obviously from on high you see things better but it is too far from the action."
"Against Austria and Croatia, we did not play well. That is why today, we tried to send a signal. We wanted to shut down the spaces, and to go from defence to attack really quickly, which we managed to do."
For Scolari there was nothing but disappointment in what was his last match in charge before taking over Premiership side Chelsea.
"I am naturally disappointed and frustrated," said the Brazilian. "I failed and I wasn't able to achieve the target that the federation had set me, qualifying for the semifinals. Germany were simply the best team at the most important moments."
Scolari, as he had announced on the eve of the match, reverted to the side that had beaten the Czech Republic and Turkey in their opening two matches. Germany, in contrast, rang the changes with Lukas Podolski the only member of the midfield to remain in the same slot he had occupied in the 1-0 win over Austria that clinched their quarterfinal place.
Schweinsteiger returned from suspension on the right in place of Clemens Fritz, Ballack was pushed up front alongside Klose with Mario Gomez dropping to the bench, while Thomas Hitzlsperger and Simon Rolfes doubled up in the centre in the absence of the injured Torsten Frings.
Portugal's start was promising enough. Starting on the left, Ronaldo quickly got away from right-back Arne Friedrich although the resulting cross was easily gathered by Jens Lehmann.
Jose Bosingwa did better from the opposite flank, whipping a dangerous ball across the six-yard line that Nuno Gomes inexplicably missed after ten minutes, and Joao Moutinho should have put his side ahead ten minutes later. Stooping to head another Bosingwa cross, the midfielder changed his mind and finally kneed the ball over from the six-metre line.
Germany had plenty of early possession but it was Portugal who were looking the more likely scorers until a lapse of concentration by Paulo Ferreira gifted Germany the opener.
A one-two with Ballack sent Podolski clear on the left and Schweinsteiger's aggressive run to the near post caught the Chelsea defender flat-footed, giving the Bayern Munich star the yard he needed to meet the low cross with a first-time finish from six metres.
Four minutes later, more poor defending combined with poor goalkeeping to leave Portugal reeling. Granted a free header of Schweinsteiger's chipped free-kick, Klose directed the ball almost straight at Ricardo but, falling backwards, Portugal's goalkeeper failed to block.
"There's only team in Basel," sang the German supporters - in English.
Deco begged to differ and the Brazilian-born playmaker's artful prompting gave his side a platform for recovery five minutes before the break when his pass sent Ronaldo into the box. The winger's shot was parried by Lehmann but Nuno Gomes hooked in the loose ball.
Another Ronaldo effort zipped inches wide in first-half stoppage time and the opening minutes of the second period saw Friedrich and Philipp Lahm booked for cynical trips on the winger and Deco respectively.
Germany were feeling the heat and the Portuguese should have equalised 11 minutes after the restart, when centreback Pepe headed over from barely two yards out after Deco had flicked-on Simao's corner. Instead, it was the Germans who extended their lead with a hugely controversial goal just after the hour mark, after Pepe had conceded a free-kick on the right.
Once again, the back four failed to deal with Schweinsteiger's delivery but Ballack shoved his Chelsea team-mate Ferreira to get the space he needed to head past Ricardo, who had, ill-advisedly, rushed off his line.
Ballack, who was scoring for the second match in succession, believed that overall the Germans had deserved the victory: "We started really well, we changed our system and became more compact and we played fantastically well especially in the first half."
Portugal's hopes of a great escape were raised with three minutes left, when Nani swung in a cross that fellow substitute Helder Postiga headed past Lehmann. But Germany held out through four minutes of added-on time without further alarm.