Swiss legend Federer had been out of action for 14 months after undergoing knee surgery, but he was back in business with a 7-6 (10-8) 3-6 7-5 win over Briton Evans.
The 20-time grand slam champion had spent a lot of time practicing with Evans in recent weeks before making his comeback and they spent another two hours and 24 minutes on court in a tight tussle on Thursday (AEDT).
Federer was delighted to be back after such a lengthy absence and the 39-year-old's next test will come against Nikoloz Basilashvili in the quarter-finals in Doha.
He said: "I was tired, I was more focused on being tired than winning the points. If I was going to go out, I was going to go out swinging. Dan had more energy left at the end but I was serving well and I thought I played a really good match. I'm incredibly happy about my performance.
"It was a pleasure to share the court with Dan and always nice to finish off with a backhand down the line on match point. The important think is how I feel tomorrow and the next day and so forth for the next six months.
"It's been a long and tough road for me. I enjoyed it though, it's been a huge challenge in my tennis career."
Top seed Dominic Thiem earlier needed three sets to defeat wildcard Aslan Karatsev 6-7 (5-7) 6-3 6-2, while the in-form Andrey Rublev was given a walkover after Richard Gasquet withdrew due to a leg injury.
Denis Shapovalov beat Vasek Pospisil in an all-Canadian encounter, while Roberto Bautista Agut was among the other winners.
Karen Khachanov reached the quarter-finals of the Open 13 Provence with a 7-6 (7-4) 6-4 win over Mackenzie McDonald, while Jannik Sinner ousted Hugo Gaston in straight sets.
Cameron Norrie, Matthew Ebden and Egor Gerasimov were also victorious in Marseille.