He will start his drive to make history against a yet-to-be-decided qualifier and could meet France's Jo-Wilfried Tsonga in the second round.
Unseeded Estonian Kanepi knocked Halep out of the first round at Flushing Meadows a year ago, making the Romanian the first top seed to lose at that tournament's earliest stage.
One of the most intriguing men's first-round matches features 2016 Wimbledon finalist Milos Raonic against mercurial Australian Nick Kyrgios, who is unseeded after his ranking slid from 13 into the 50s, but has tour-level wins over Federer, Nadal and Djokovic to his credit. Stan Wawrinka, the 2014 AO victor, looms as a second-round foe for Kyrgios.
Aiming for a third consecutive Australian championship, a 21st Grand Slam crown and a 100th career singles title, Federer will open against Denis Istomin.
"I always have tried to remind myself that this is a dream", Federer said of his longevity at the draw ceremony held at Margaret Court Arena, where he discovered the world number 99 would be his opening opponent. If it would happen defending this title, I would gladly accept it.
Those two, and seventh seed Dominic Thiem, are in the same quarter as Alexander Zverev, who could meet Djokovic in the semifinals but must first plot his way past Aljaz Bedene in the opening round.
Eurosport pundit John McEnroe sees the changing of the guard coming in 2019, saying: "I believe this year will be the year that you are going to see one of these young kids break through".
Federer and Djokovic discovered their fate for the Australian Open earlier today after the draw was made.
Serena Williams, who is seeded 16th, faces fellow mother Tatjana Maria of Germany in her first competitive match since her tempestuous US Open final loss to Naomi Osaka.
"To finally get that (title) here was so special, it's the happy slam".
The Spanish 22nd seed defeated Djokovic on his way to the title in Doha last week while concerns about Murray's fitness grew as he struggled through a practice match against Djokovic at Melbourne Park on Thursday. "I've had a great off-season and I feel very well prepared".