A 4-2 win over Costa Rica was not enough for Hansi Flick's side, who crash out for the second World Cup campaign in a row.
Germany are out of the World Cup, after suffering a disappointing second consecutive group-stage exit on an incredible night of drama in Group E.
Hansi Flick's side needed all three points to give themselves any chance of progressing to the knockout phase, but it wasn't enough.
Despite coming from behind to outclass Costa Rica 4-2, Thomas Müller's men finished third of their group, two points behind leaders Japan following their stunning 2-1 win over Spain.
This means that Japan will next lock horns with Croatia after their goalless draw with Belgium.
Belgium sent home early
Roberto Martinez's side, who finished third in Russia four years ago, produced another lacklustre display as their star striker Romelu Lukaku was unable to find the back of the net.
This sees Belgium finish third of a group led by outsiders Morocco, who will next take on Spain for a place in the quarter-finals.
Click on the video above to see the final group stage standings from Group E and F.