The 35-year-old Swiss made light of the baking Florida sun to underline his 2017 resurgence with a 6-3 6-4 triumph and a repeat of his successes over the Spaniard in the Australian Open final and at Indian Wells.
Fourth seed Federer survived a series of early scares in a tight first set, and it was he who eventually made his move in the eighth game to convert a break point at the third attempt and give himself a chance to serve for it.
Having opened the door, he powered his way through it with a confident service game to take the set 6-3.
Nadal, who was disturbed by a drone flying above the court as he prepared to serve early in the second set, had to defend two break points at 3-3 with Federer's backhand in full flow, but he could not resist at the next time of asking.
A net cord which left the Spaniard in a hopeless position at 30-all handed his opponent another chance to break, and he forced an error to take a 5-4 lead and the opportunity to serve for the title.
Nadal was given hope when Federer opened with a double fault, but he restored parity with a glorious backhand pass and served out to secure victory.