The 25-year-old Spaniard matched Bjorn Borg's tally of victories at Roland Garros with a 7-5 7-6 (7-3) 5-7 6-1 victory in three hours and 39 minutes.
Nadal, who has now won 10 Grand Slam titles in total, also ensured he will remain at the top of the rankings ahead of Novak Djokovic.
In a thrilling encounter, the Majorcan withstood a Federer fightback after failing to capitalise when two sets and a break in front.
"To win this final against one the best players in the world and in history is something which is really fantastic for me. It's one of my most beautiful dreams," said Nadal,
"Congratulations to Rafa for having won the tournament once again. He played a super match," said the Swiss.
Federer, 29, had begun in the same flowing form that ended Djokovic's 43-match unbeaten run in the semi-finals http://news.bbc.co.uk/sport1/hi/tennis/13638861.stm , pressuring the five-time champion with his forehand and breaking at the first opportunity.
Nadal, who had treatment on his feet for what appeared to be blisters, appeared nervous and the first set was heading to Federer when the Swiss dominated on set point at 5-3, running around his forehand and creating space for a drop shot, only to see it land a fraction wide.
A cross-court backhand got Nadal out of trouble and began a stunning turnaround as the Spaniard suddenly found the depth and vicious spin off his groundstrokes that have helped him dominate at Roland Garros.
Federer could only find the net with a volley when Nadal fired a forehand down the line on break-back point in game nine, and two equally blistering forehands and a magical lob volley helped the champion move ahead at 6-5.
When Nadal whipped a forehand across Federer to take the set it must have been a shattering blow for the former world number one, and he played a poor game at the start of the second to fall further behind, Nadal breaking with a mid-court forehand steered down the line.
The Federer backhand was starting to leak points now and he had to rely on some great serving to fight off three more break points in game five, but he clung on to a rampant Nadal and surprisingly drew level at 4-4 when the Spaniard mishit a backhand.
It was an unexpected chance for Federer to grab a foothold in the match but Nadal simply would not allow it and powered back in the next game, regaining his advantage when another Federer backhand found the tramlines.
There seemed little prospect of a second lifeline in the set for Federer but it came, as Nadal served at 5-4, through the widely predicted rain that had held off for almost two hours.
A first set point for the Spaniard slipped by in the confusion as umbrellas went up around Court Philippe Chatrier, and when play resumed 10 minutes later with the score at 5-4, 40-40, it was Federer who responded much the better.
Piling on the pressure immediately with some heavy forehands, he forced Nadal into a mishit to get back on level terms and looked the likelier going into the tie-break.
The burst of Federer form shuddered to a halt, however, with the errors returning under pressure from Nadal, and after moving 4-0 clear the world number one hit a screaming cross-court backhand to set up four more set points, a forehand ripped into the corner completing the job.
With the champion boasting a 44-1 record at Roland Garros, Federer's prospects looked as gloomy as the skies above when a poor drop shot and a fizzing Nadal return saw the Spaniard move 4-2 clear in the third, but as in the previous set there was a way back for the Swiss.
Another drop shot, this time perfectly weighted, helped Federer break back to love in a superb game and after a quickfire hold the 16-time Grand Slam champion sensationally broke again, this time with a backhand, before serving out to a tumultuous reception from the Chatrier crowd.
The comeback was well and truly on when Federer moved to 0-40 at the start of the fourth but Nadal showed his mettle when it mattered with the match starting to run away from him, clinging on to take the game.
Nadal had weathered the storm and Federer simply could not maintain such an exalted level, with a double fault and a forehand into the net handing the Spaniard a love break for 3-1, and still bristling with energy the top seed got the security of a double break when Federer netted.
Serving for a sixth title, Nadal sank to his knees when Federer fired a forehand over the baseline on match point, ensuring the world number one notched another mark in tennis history.
Former British number one John Lloyd stated on BBC Two: "It was an amazing fightback in the third by Federer, but he was a step too slow in the last 20-25 minutes.
"Rafa looked stronger as the rallies went on and, on a clay court, that is crucial. But it was an incredible performance by Nadal."