Nadal suffered a shock first round defeat in the first round on Monday against Belgian Steve Darcis, ranked 125th, while Federer cruised into the second round after handily trouncing Victor Hanescu, of Romania.
The Spaniard lost 7-6 (7-4), 7-6 (10-8), 6-4 to Darcis in one of the biggest surprises imaginable at the All England Lawn Tennis and Croquet Club.
Earlier Federer, who has just won one grand slam in his 13 attempts, sounded tentative about his prospects of winning Wimbledon for an eighth time.
“I’ve got a tough draw with Rafa in my quarter,” he said prior to the start of the tournament.
Now the Spaniard is out, Federer’s potential path to victory looks easier, although the likes of top-ranked Novak Djokovic and Andy Murray (who also advanced to the second round) remain among the possible daunting adversaries.
Federer, 31, swept to a 6-3, 6-2, 6-0 win on Centre Court to celebrate the 10th anniversary of his first triumph at Wimbledon.
The seven-time champion Swiss fired 32 winners and just six unforced errors as he clinched a sixth career victory over the 47th-ranked Romanian.
"It's the most special thing to be back on Centre Court," said Federer, playing in his 55th straight Grand Slam and seeking an 18th major.
"I still enjoy it out there," he said.
Federer said he was happy to get the first round out of the way.
"I am not sure how much better I could have played," he said.
"It was good to get it done quickly as it was cold and it released some of the pressure."
Federer came into Wimbledon on the back of his first title of 2013 in Halle, the grasscourt win taking him level with John McEnroe on 77 career titles.
He next plays Sergiy Stakhovsky of the Ukraine for a place in the last 32.
Switzerland's other hope at Wimbledon, Stanislas Wawrinka, was eliminated in three sets by Australian Lleyton Hewitt, who won Wimbledon in 2002.
Wawrinka, ranked tenth in the world, lost 6-4, 7-5, 6-3, to Hewitt, a 31-year-old veteran who was won all the Grand Slams but is now ranked 70th.