The No.1 seed struggled to deal with Fognini early before coming from behind to secure a 2-6 6-1 6-2 win against the Italian, who is the No.7 seed in Montreal.
Nadal lost to Fognini at Monte Carlo earlier this year, but his win at the ATP Masters 1000 event marked his 12th in 16 meetings between the pair.
A four-time champion at the tournament, the Spanish great, who now has 40 wins this year, was in trouble early as Fognini made a flying start.
Nadal, an 18-time grand slam winner, sent a forehand long to fall 2-1 behind as Fognini raced out to a 5-1 lead before claiming the opening set.
However, that drew a response from Nadal, who won the first nine points of the second set, Fognini unable to recover from a 3-0 deficit.
A break in the opening game of the decider set up Nadal, who dropped just five points on serve during the set to secure his spot in the last four.