Federer last played at Wimbledon in June 2016 before taking the rest of the season off. Photo: Clive Brunskill/AFP
The Swiss champion, who has been out of action for six months due to injury, helped his country make a clean sweep of the tie against the Brits when he cruised to victory in 61 minutes with scores of 6-3, 6-4.
Teammate Belinda Bencic also beat Heather Watson before the Swiss pair triumphed in the dead mixed doubles rubber.
The men's singles was Federer's first match after a half-year break due to knee and back injuries, which saw him slide out of the top ten for the first time since late 2002.
The 35-year-old, who entered 2017 ranked 16th — his lowest placing since 2001 — admitted he felt emotional on his return to the court but said the knee didn't trouble him at all.
“For a first match it was great, because obviously expectations were quite low,” he said.
“For three and four weeks now I have stopped thinking of it (the knee). I don't have any pain.
“I am in a way sad it (the comeback) is over, because I enjoyed it so much, I feel a bit relieved but sad.”
Despite plenty of practice in Dubai in recent weeks, Federer said it was important to test himself in an actual match.
He first hurt his knee after a semifinal loss to Novak Djokovic at the Australian Open in January while filling a bath for his children.
He required minor surgery on a torn meniscus and was then hampered by a back injury which forced him out of the French Open.
The 17-time Grand Slam singles champion then suffered another knee complaint at Wimbledon in his semifinal loss to Milos Raonic, before electing to rest for the remainder of the year.
But there were immediate signs of the Federer class against the 66th-ranked Evans, as he opened the match with an ace and then reeled off a couple of superb passing shots in the fourth game.
Playing in front of a crowd of 13,684, a record for a tennis match in Perth, Federer delighted the fans when he broke Evans in the sixth game to take control of the first set.
He will face emerging German teenager Alexander Zverev on Wednesday in a much-anticipated match-up.
After Federer gave Switzerland the lead, Bencic secured the tie with a three-set win over Watson, 7-5, 3-6, 6-2.
In the Fast Four mixed doubles, Federer and Bencic made quick work of the match, winning, 4-0, 4-1.