Swiss second seed Federer escaped with a straight-sets win over British eighth seed Andy Murray 6-3 7-5, despite trailing 4-1 in the second set.
Murray had opened up a double-break lead as he looked to take their quarter-final in Cincinnati to three sets, but the Scotsman lacked the killer instinct as Federer won four games on the spin.
The two-time major winner prolonged the contest with a hold of serve in the 10th game, but the Swiss maestro broke in the 12th to ease into the last four at the hard-court ATP 1000 event.
Federer teed up a date with Canada's Milos Raonic, with the fifth seed dismantling Italy's Fabio Fognini 6-1 6-0.
Fognini, the 15th seed, won just 11 points in the first set, as Raonic dominated from the outset - breaking the Italian six times in seven games.
Federer has beaten Raonic in each of their five meetings.
The other semi-final will pit Spanish sixth seed David Ferrer against unseeded Frenchman Julien Benneteau.
Ferrer accounted for countryman and 16th seed Tommy Robredo 6-4 3-6 6-3 to reach a Masters semi-final for the third time in 2014, and the 15th time in his career.
The 32-year-old has only once converted a last-four appearance into a title win at the higher-tiered event, when he claimed the Paris Masters in 2012.
However, Ferrer's path to the final was made a much easier task after Benneteau knocked out Swiss Wawrinka.
Benneteau, ranked 41st, reached his first career Masters semi-final after downing Wawrinka 1-6 6-1 6-2.
Wawrinka was well on top early, breaking twice in succession to take the first set comfortably, but Benneteau broke in the second and sixth games of the second set to level the match.
And the Frenchman was rock solid on serve in the decider, as he did not face a break point while twice breaking the Wawrinka serve to complete a stunning turnaround.
Ferrer has a 5-4 head-to-head record against Benneteau, although the latter has won three of their five clashes on hard courts.