The Internacional forward had not scored in 12 matches for his country, but picked a good time to come up with the clincher when he bagged his 34th goal for his country on 51 minutes amid a spare atmosphere in Salvador.
Luis Suarez fed Edinson Cavani on the break and he slipped the ball into the path of former Atletico Madrid striker Forlan, who did not have to break stride in smashing the ball high into the Nigeria net from 12 yards.
Lugano had given Uruguay the lead with a miskick on 19 minutes after Cavani had missed Forlan's cross into the heart of the Nigeria box.
The win leaves Uruguay as overwhelming favourites to join Spain - who walloped Tahiti 10-0 earlier in the evening - in the last four of the competition when Group B concludes on Sunday evening. Nigeria need to beat the world champions Spain in their final match with Uruguay certain to reach six points against minnows Tahiti.
If Nigeria fail to end Spain's 24-match unbeaten run in international climes, they will be on the plane home from Brazil on Monday despite a 6-1 drubbing of Tahiti in their opening group game.
Spain only need a point to finalise their progress.
Nigeria could easily have gone ahead on 42 minutes.
The lively Ahmed Mussab produced a corner that saw Diego Godin head back across his own goal under pressure, but Uruguay goalkeeper Fernando Muslera did just enough to flip the ball over his bar.
Uruguay managed to keep Nigeria at arm's length in the second half, but they will hope for more from Cavani if they progress in the tournament.
He did not look like a figure who scored 33 times for Napoli last season as he walloped miles over the bar on 68 minutes before somehow heading wide from seven yards from a Forlan free-kick on 75 minutes as Nigeria remained a threat until the end.
Fortunately for Uruguay, those misses did not prevent them from collecting three points that should see them through.
MAN OF THE MATCH
Diego Forlan - A stunning goal and showed he still has the movement to trouble any defence in the world.
Nigeria: Enyeama 7, Ambrose 5, Omeruo 6, Oboabona 6, Echiejile 6, Ogude 6, Mikel 6, Musa 7, Ogu 5, Oduamadi 6, Ideye 6...subs: Akpala 6, Babatunde 6, Mba 6
Uruguay: Muslera 6, Maxi Pereira 6, Lugano 5, Godin 6, Caceres 6, Arevalo Rios 5, Gonzalez 5, Rodriguez 6, Forlan 8, Suarez 5, Cavani 4..subs: Coates 5, Pereira 6