Federer invited Edberg, a six-time grand slam tournament winner, to work with him for a few days in Dubai earlier this month and the Swede hinted it could turn into something more permanent.
Now Federer has confirmed he will work with Edberg for a minimum of 10 weeks, starting at the Australian Open in two weeks' time.
That will also be the first grand slam for the new pairing of Novak Djokovic and Boris Becker, while Andy Murray has won both his grand slam titles since he appointed Ivan Lendl as his coach.
Federer said on his website: "I am happy to announce that, beginning in Melbourne, Stefan Edberg will join Severin Luthi on my coaching team. Severin, who has been part of my team for the last seven years, will do most of the weeks and Stefan has agreed to work with us for at least 10 weeks, starting at the Australian Open in Melbourne. Stefan was my childhood hero and I am really looking forward to spending time [with him] and learning from him."
Federer endured his worst season for more than decade in 2013 and split from his former coach Paul Annacone in October, although he continued to work with Luthi, captain of the Switzerland Davis Cup team.
The 32-year-old posted some encouraging results at the end of the season and has consistently said that, back issues permitting, he is optimistic of rediscovering something like his best form in 2014.
Edberg said: "I'm really excited to be part of Roger's team and I hope together we can bring out his best tennis."
Meanwhile, two former French Open winners, Sergi Bruguera and Michael Chang, will also be back on tour in 2014, with the Spaniard Bruguera coaching the Frenchman Richard Gasquet while the American Chang helps Japan's Kei Nishikori.