Nadal took an hour and a half to defeat the unseeded Fabio Fognini comfortably in straight sets 6-1, 7-5, reaching his fifth final in Miami in the process.
Following his dominant win over the Italian, Nadal, who has only lost one set in Miami so far, claimed he had no preference for an opponent in the final.
"It's great to be in the final," Nadal said, as quoted on ATP. "For me, doesn't matter the opponent. I am happy to be in that final again, and I am excited to play another final of an important event."
Federer's task, however, was not as easy as he was pushed all the way in a three hour classic with Nick Kyrgios, eventually defeating the Australian 7-6, 6-7, 7-6 to reach his first final in Miami since winning the event in 2006.
With a sell-out crowd firmly behind Federer, the two players produced a great game of back-and-forth tennis with the flashy Australian dazzling more than once, including a between-the-legs winner during the second set.
However, the 21-year-old's serve backfired on him during the final tie-break going long for a double-fault, allowing Federer to capitalize on his third match point. It was just the seventh time that the Australian Open winner had played all tie-breaks in a best-of-three set matches in his career, with his head-to-head record against Kyrgios now standing at one apiece.
Federer has also won 10 matches in a row, with his latest win being his 18th in 19 games in 2017 as the 35-year-old continues to have a career resurgence.
Nadal, who lost to Federer in the Australian Open final as well as the BNP Paribas Open, will be looking to exact some revenge, having failed to beat him in his last two attempts.
The final takes place on Sunday (2 April).