The British fourth seed defeated the Finn 1-6, 6-4, 6-1, 6-2 but he had looked down and out in the first few games of the match as the lower back strain that he has been struggling with all year struck again.[break]
Grimacing in pain, Murray needed medical treatment three times in quick succession as grim-faced coach Ivan Lendl looked on.
But at a set and 4-2 down, Murray suddenly found a new lease of life and a run of seven games in a row in his favour gave him command.
The strained look on his face at the end when Nieminen hit it long, however, bore testimony to the concern that he must have for his chances of making it six straight semi-final appearances at Grand Slam tournaments.
"It was tough, I was obviously struggling at lot particularly at the beginning of the match. He helped out a little bit and got nervous at the end of the second set. I don´t know how I won to be honest," he told the BBC.
"I think my back went into spasm. It was sore this morning when I got up and practiced and it was sore 20 minutes after I finished practice.
"The guys were telling me to stop after the first set, we talked about it briefly before the match and I just decided to play. Sometimes guys can get nervous and you feel better, and a combination helped me get through.
There was no such drama for other early second round winners on a day of cooler temperatures and cloudier skies at Roland Garros.
Fifth seed Jo-Wilfried Tsonga completed a 6-2, 4-6, 6-2, 6-1 win over German qualifier Cedrik-Marcel Stebe, while sixth seed David Ferrer of Spain coasted past Benoit Paire of France 6-3, 6-3, 6-2.
Murray´s next opponent in the third round will be Colombian Santiago Giraldo who defeated Australian 25th seed Bernard Tomic 6-4, 6-1, 6-3
Another South American claycourter to make it through was 13th seed Juan Monaco of Argentina who stopped Lukas Rosol of the Czech Republic 7-6 (7/4), 6-0, 7-6 (7/5).
Rising Canadian player Milos Raonic defeated qualifier Jesse Levine 6-4, 7-5, 6-2 meaning that five days into the tournament John Isner is the only surviving American player.
Isner is due on court later on Thursday against Frenchman Paul-Henri Mathieu, aiming to reach the third round at Roland Garros for just the second time in his career.
Also in action is defending champion Rafael Nadal who takes on Denis Istomin of Uzbekistan.
The Spaniard, who will turn 25 during the tournament, is seeking to win a record seventh French Open title taking him out of tie for the most wins he currently shares with Bjorn Borg.
Bill Murray confirmed to return for 'Ghostbusters 2020'