Federer battled past fellow Swiss Stanislas Wawrinka 6-3, 6-7, 7-5 to set up his anticipated date with former world No 1 Nadal.
Nadal went through with a 4-6, 6-4, 7-5 victory over Latvian qualifier Ernests Gulbis.
"Obviously playing Rafa, it's a classic," Federer said. "We have played so many times. We know each other really well on and off the court. We know what to expect, both of us."
One novelty aspect of Thursday night's showdown is just how early in the tournament it is taking place.
Apart from round-robin play in the ATP Finals, Nadal and Federer have not met ahead of semi-finals since 2004, when the Spaniard was still a rising teenage star.
Nadal leads their head-to-head series 18-10, but Federer noted that both players are unknown quantities right now.
The Swiss great, owner of 17 grand slam titles, has yet to win a trophy this year, while Nadal returned in February from seven months rehabilitating his troublesome left knee.
"We are both a bit suspect going into our match, so it's an interesting match-up," Federer said.
"It's not like a first round, but it still is early in the tournament. In the past this match used to be a final, now it's a quarter-final, so obviously it's a bit of bad luck of the draw for both of us."
Federer admitted he had something of a lucky escape against Wawrinka.
Although he improved to 13-1 against his old friend and gold medal-winning doubles partner from the 2008 Beijing Olympics, he needed two hours and 20 minutes to do so.
Serving for the match at 5-4 in the second set he was broken at love. Unable to convert two break points in the following game he surrendered the set on a tiebreaker when he double faulted on set point.
Wawrinka then gained the upper hand with a break in the third set, but Federer broke back in the next game and earned the decisive break in the final game as Wawrinka smacked a volley into the net.
For Wawrinka it was another bitter disappointment in 2013. He was beaten 12-10 in the fifth set of a five-hour fourth-round encounter with Novak Djokovic at the Australian Open, and came up on the losing end of a marathon doubles defeat in a Davis Cup tie against the Czech Republic.
"Today for sure I had some chances," Wawrinka said. "I found my game. I was close, but not enough."
Andy Murray, the world No 3, punched his ticket to the quarter-finals with a 7-6, 6-4 victory over unseeded Argentinian Carlos Berlocq.
Murray was rattled not only by the quality of his opponent's play but also by the grunting coming from his opponent, an issue more often associated with the women's game. He also showed his displeasure more than once.
The Scotsman who is the reigning US Open champion and gold medallist at last year's London Olympics, next faces either seventh-seeded Juan Martin del Potro of Argentina or German veteran Tommy Haas.
In other matches, sixth-seeded Czech Tomas Berdych eased past Frenchman Richard Gasquet 6-1, 7-5 while eight-seeded Jo-Wilfried Tsonga came from a set down to beat Canada's Milos Raonic 4-6, 7-5, 6-4.
In a showdown between two power servers, Raonic blasted down 12 aces to Tsonga's seven but the Canadian made a double fault when serving at 30-40 for the contest to end in just under two hours.
Earlier, big-serving South African Kevin Anderson became the first player to reach the last eight, and his second ATP Masters 1000 quarter-final, with a 6-3, 1-6, 6-4 victory over Frenchman Gilles Simon.
In the women's category. Maria Kirilenko added another upset to her Indian Wells resume as she toppled fifth-seeded Petra Kvitova in three sets to reach the semi-finals.
Russia's Kirilenko, playing her first tournament since retiring with a right shoulder injury in the first round at Doha, defeated the 2011 Wimbledon champion Kvitova 4-6, 6-4, 6-3.
She improved to 6-0 in three-set matches this year and reached the Indian Wells semi-finals for the first time in 10 appearances.
She benefitted from a poor service game by Kvitova in the final game of the second set, when the Czech served four of her total 13 double faults of the match to drop the game and the set.
After they traded breaks in the sixth and seventh games of the third, Kvitova again double faulted on break point in the eighth to allow Kirilenko to serve for the match at 5-3.
Kirilenko fell behind 0-30, but reeled off four straight points to secure the win.
"I just said to myself serve as hard as you can," said Kirilenko, adding that by that time she could tell Kvitova was going for broke on every shot.
"Finally I reached the semi-finals!" she said.
Kirilenko, who beat third-seeded Agnieszka Radwanska in the fourth round, will face either second-seeded Maria Sharapova or sixth-seeded Sara Errani, who faced off in a French Open final rematch later Wednesday.
Sharapova swept past Errani in the title match at Roland Garros last year to complete a career Grand Slam, and beat Errani again in the first round of the season-ending WTA Championships.
The Russian star, seeded second here behind defending champion Victoria Azarenka, was vying to reach a third straight semi-final this season.