Number two Federer put Nadal under the cosh immediately on the Spaniard's serve, breaking him in the first game -- to roars of approval from the majority inside the arena.
Another break to 36-year-old Federer in the pivotal fifth game of the second set put him in reach of a second Shanghai Masters crown -- and a sixth title in 2017.
"We didn't think maybe we were going to have the year we did, I definitely didn't," Federer said on court afterwards, looking at Nadal, reflecting on their continued success even at this late stage of their careers.
"It's nice to share this court with you today and I hope there are more to come in the tournaments we've got left.
"It's been a pleasure playing against you here today."
Federer, fondly known as "Cow" in China for his laid-back personality, had started the better in grabbing the break and he then rattled through his own service game for 2-0.
Federer, a 19-time Grand Slam champion, was in full flow under the Qizhong Tennis Center roof, which was closed because of downpours in Shanghai.
Nadal, 31, fresh from winning the US Open and China Open, groaned while lashing many of his shots; Federer was all quiet efficiency.
Somewhere in the stadium somebody rattled a cow bell.
Federer rapidly made it 4-2 with two booming aces in a row, drawing huge cheers from much of the stadium.
In contrast, Nadal -- a 16-time Grand Slam winner but who had never won the Shanghai Masters -- was labouring through his service games.
There were suggestions that Federer might not be quite as fresh as his old foe, having been pushed to three sets a day earlier in the second semi-final against Juan Martin del Potro.
The timeless Federer rubbished that notion as he seared his way to a 5-3 first-set lead.
Nadal sent down his fourth ace for 5-4, only for Federer to seal the set with his seventh ace of the match.
There was little between the great rivals in the early exchanges of the second set until the fifth game.
Nadal saved the first break point but could not survive the second one to put Federer in reach of the title.
Nadal, for whom defeat sees Federer close the gap at the top of the world rankings as the year approaches its climax, has nevertheless enjoyed a remarkable season.
His triumph in Beijing last weekend was also his sixth of the year as he continues to defy doubts about his fitness following repeated injury.
The Spaniard called it "an emotional year".
"Today you played a fantastic match so well done, may congratulations," he told Federer.