The 20-time Grand Slam title winner, who underwent two knee surgeries in 2020, secured the first set but eventually wilted and lost the quarter-final tie, 3-6, 6-1, 7-5.
It was Federer's first match in 405 days after having knee surgery following the 2020 Australian Open.
Jennifer Brady lost in her first match since the Australian Open final, falling to Anett Kontaveit 6-1, 6-2 in the first round of the Qatar Open.
Gael Monfils said he expected a tough Australian Open despite claiming his first title of the season on Saturday.
Gael Monfils won the Qatar Open final in straight sets, brushing aside Russia's Andrey Rublev in a one-sided final.