Germany next face the Netherlands or Argentina in the final match for the World Cup on Sunday night.
Brazil's defending was truly awful and Germany took full advantage with brilliant passing and movement to march into the final and hand the host nation their heaviest ever World Cup defeat.
An unmarked Thomas Mueller got the first from a corner after 11 minutes before Miroslav Klose struck to become the World Cup's all-time leading scorer with 16 goals.
Brazil's defence, badly missing the suspended Thiago Silva, fell apart as Toni Kroos grabbed two in three minutes before the superb Sami Khedira added a fifth in the 29th minute to leave the crowd, and millions watching on TV, in a state of total shock.
Brazil's few second-half attempts were foiled by in-form goalkeeper Manuel Neuer and Germany substitute Andre Schuerrle banged in the sixth in the 69th minute and lashed in a seventh to inflict Brazil's first competitive home defeat in 64 matches and 39 years.
Oscar scored a consolation goal for Brazil in the last minute.
First half: 1, Germany, Thomas Muller 5, 11th minute. 2, Germany, Miroslav Klose 2, 23rd. 3, Germany, Toni Kroos 1, 24th. 4, Germany, Toni Kroos 2, 26th. 5, Germany, Sami Khedira 1, 29th. Second half: 6, Germany, Andre Schurrle 2, 69th. 7, Germany, Andre Schurrle 3, 79th. 8, Brazil, Oscar 2, 90th. Shots: Brazil 17, Germany 14. Shots On Goal: Brazil 12, Germany 12. Yellow Card: Brazil, Dante, 68th. Offsides: Brazil 3, Germany 0. Fouls Committed: Brazil 10, Germany 13. Fouls Against: Brazil 13, Germany 9. Corner Kicks: Brazil 7, Germany 5. Referee: Marco Rodriguez, Mexico. Linesmen: Marvin Torrentera Rivera, Mexico; Marcos Quintero Huitron, Mexico. Attendance: 58,141