Federer downed his one-time junior rival Jurgen Melzer of Austria 7-5, 3-6, 6-2, 6-2. The Swiss 17th seed will now play American qualifier Noah Rubin in the second round.
Murray, Serena handed tough routes to Australian Open final
"It's nice to be playing normal tennis again and I couldn't be happier to be back," said Federer, who missed the second half of last season through injury. "I hope I can stick around for a bit longer yet."
Federer, at 35, is bidding to become the second oldest man in the Open Era to win a Grand Slam title after Australian Ken Rosewall.
The 17-time Grand Slam champion, playing in his 69th major, is seeded 17 at this year's Australian Open after a knee injury restricted him to just seven Tour events last year.
Aisamul Haq wins first title of 2017
Federer dropped out of the world's top 10 rankings for first time in 734 weeks or over 14 years last November and his 17th ranking is his lowest position since May 2001.
He fell behind to an early break against Melzer in the opening set but once he gained his playing rhythm he broke back and then again in the 11th game.
Melzer, who grew up in the juniors with Federer, levelled the match taking the second set.
But the Swiss legend whipped through the third set in 28 minutes with the Australian crowd cheering his every winning point.
Federer finished off in style with two breaks of serve to run a convincing winner.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ