Nadal staved off four break points to avoid going down a double-break early in the second set, a pivotal game that set the stage for his 6-2 6-3 victory on the Crandon Park hardcourt.
Nadal's poise and shotmaking came to the fore when 13th seed Sock threatened to take a stranglehold on the second set.
"That was the key of the second set, two-love [down], 15-40," said Nadal in a courtside interview. "With three-zero a player like Jack, you'll probably be thinking third set.
Federer reaches quarter-finals of Miami Open
"It was a double positive thing. I saved that game and got the break back [in the next game]. The match was much closer than the result says."
Nadal could face his long-time nemesis Federer in the final, with the Swiss, who has a Thursday quarter-final against Tomas Berdych, on the other side of the draw.
Federer and Nadal have met twice this year, with Federer winning both times, in a memorable five-set final at the Australian Open and in a one-sided straight-sets fourth-round thumping at Indian Wells two weeks ago.
But Nadal is not looking ahead to Federer, because his semi-final opponent Fognini presents a potential banana skin.
In-form Federer through to Miami Open fourth round
Nadal has a 7-3 career record but is mindful he lost to the Italian in a five-set thriller on the US Open hardcourt in 2015.
"It's like a dream maybe," said the 29-year-old Fognini after becoming the first unseeded player in 10 years to make the Miami semis. "This is a big, big tournament for me. I'm happy about my performance. I'm just trying to be focused on my game and do my best."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ