Federer and Nadal, the top two players, have never met in the Davis Cup.
"We have to accept how the draw is. We'll try to beat them in Spain," Switzerland captain Severin Luthi said. "For sure that's one of the toughest draws we can have."
Federer has often opted to skip Davis Cup play. But he earned two points for the team over the weekend when Switzerland beat Italy 3-2 in the playoffs to remain in the top-tier World Group.
"It's too early to say if Roger will play or not," Luthi said.
Nadal usually plays for Spain, which won the title last year and will face the Czech Republic in the final on Dec. 4-6. Spain defeated Israel 4-1 last weekend in the semifinals, but Nadal missed the series because of injury. He also missed last year's final win over Argentina because of injury.
Federer and Nadal have met in seven Grand Slam finals, with Nadal winning five. Until his loss to Juan Martin del Potro in this year's U.S. Open final, Federer had been undefeated in major finals against everyone but Nadal.
The draw for the World Group will also send the United States to Serbia, making a match between Novak Djokovic and Andy Roddick a possibility for the best-of-five series from March 5-7.
"It's certainly a huge match, and certainly Djokovic playing in his home country will be tough," U.S. Tennis Association coach and former Davis Cup captain Tom Gullikson said. "But Roddick actually had some very good success against him this year and hopefully that'll continue into the first round of Davis Cup next year."
The other first-round matchups: Belgium vs. Czech Republic; Germany vs. France; Argentina vs. Sweden; Russia vs. India; Ecuador vs. Croatia; and Chile vs. Israel.
Serbia drew the home advantage against the United States.
"Our wish was to play at home," Serbia captain Bogdan Obradovic said. "No one wants to play away, and I think the Americans won't like it. We have a huge wish to beat them in front of the packed arena in Belgrade."
The United States has won a record 32 Davis Cup titles, the last coming in 2007. This year, the U.S. lost to Croatia in the quarterfinals.
The Americans have used Roddick and 24th-ranked James Blake as their two singles players for several years, but 25th-ranked Sam Querrey is another option for captain Patrick McEnroe.
"He's a rising young American star and he would certainly be competing for the No. 2 spot," Gullikson said. "Blake didn't have the best year this year, up to his standards, but I think we'll still be a very formidable team."
Spain defeats Israel, advances to Davis Cup finalEspanyol name new captain