After their impressive 2-1 win over Canada on Sunday, this was a less assured performance from two-time winners Germany, who took nearly an hour to impose themselves against a bruising Nigerian side.
Midfielder Simone Laudehr scored the crucial second-half goal and Germany will now take on France in both teams' final group game in Mönchengladbach next Tuesday to decide who will finish top of the group.
Nigeria will be heading home after their final match against Canada in Dresden the same day, when both teams will be playing for pride after two successive defeats.
Germany failed to shine throughout and coach Silvia Neid said she had plenty of work to do before facing the French.
"We are into the quarter-finals, but without too much glory," said Neid. "We gave away too many balls to green shirts and had to work hard to get it back. We still have plenty to work on.
"To me, the players seemed to be inhibited and not as light as the previous match. There was a lot of stress, because we wanted to reach the quarter-finals and that seemed to hinder us."
Nigeria coach Eucharia Uche has sparked controversy at this tournament by making several anti-homosexual comments, but her team have failed to impress on the pitch at Germany 2011.
"We are no longer in contention, but we are still playing for pride and prestige against Canada," said Uche.
"Don't forget this is the same team which came here and conceded eight goals to Germany in a friendly last November, so we have made some progress."
Nigeria made life hard for Germany in Frankfurt, however, and the hosts failed to get a clear shot on goal in the first half.
They were briefly booed by the sell-out crowd at the half-time whistle with the game scoreless.
Germany finally took the game by the scruff of the neck after the break and it was the introduction of the experienced Inka Grings on 52 minutes for captain Birgit Prinz that made an impact.
Barely two minutes later, the veteran forward latched onto a free-kick and her delicate backheel fell into the path of Laudehr, who fired home in plenty of space.
The Africans certainly made their presence felt as Frankfurt midfielder Melanie Behringer had to come off after only half an hour after taking a knock to the leg.
Prinz, Germany's record goal-scorer and most capped player, who was making her 215th appearance, was also left on the bench with her leg heavily strapped.
With time almost up, Neid threw on playmaker Fatmire Bajramaj, but the winger failed to make an impact even as the spaces opened up in the dying stages.
Having won the 2003 and 2007 editions of the World Cup, Germany will need to raise their game if Neid's side are going to return to Frankfurt on July 17 to contest the final of the three week-long tournament.