The Swiss tennis federation confirmed Federer’s participation Wednesday after it was first announced on the tournament’s official Twitter account.
Federer teams up with new Australian Open champion Stanislas Wawrinka, now the Swiss No. 1, against a Serbian side missing second-ranked Novak Djokovic.
The winner plays Belgium or Kazakhstan in the quarterfinals in April.
Federer has played only one first-round match since 2004. He last represented Switzerland in September 2012, helping win a relegation playoff against the Netherlands.
Serbia, the 2010 champion, is hosting the match without any top-100 players after Djokovic pulled out. Janko Tipsarevic is nursing a heel injury, and Viktor Troicki is serving a doping suspension.
Dusan Lajovic at No. 102 is the highest ranked team member.
The series opens Friday on indoor hardcourt at Novi Sad.