Federer was making his first competitive appearance in more than six months in Melbourne and the Swiss emerged unscathed, beating Melzer 7-5 3-6 6-2 6-2.
After sitting out the second half of 2016 to overcome injuries to his left knee and back, Federer showed signs of rust on Rod Laver Arena but he also improved as the match went on, giving away only four games and not a single break point in the final two sets.
How the 35-year-old’s form, and fitness, copes under the pressure of tougher opposition remains to be seen but he should find some leeway again in round two, against American qualifier Noah Rubin.
“I think there were definitely some nerves there,” Federer said. “I was actually fine all day and in the warm-up five minutes before with Jurgen. I felt fine.
“Then I hit four frames in a row. It was like, ‘Whew, it’s not as easy as I thought it was going to be’. I think I struggled for a while to find that groove, that rhythm and everything. Then you remind yourself how many times has it not been easy in the first round.”
Andy Murray won his first Grand Slam match since becoming number one but was given a stern test by world number 95 Illya Marchenko. Murray was far from his best but reached the second round with a 7-5 7-6 (7-5) 6-2 win over the Ukrainian.
The Scot, attempting to win his first Australian Open title after five final defeats, won in two hours 48 minutes.
Also through to round two is Swiss Stan Wawrinka but the number four seed was pushed all the way by Slovakian Martin Klizan in a five-set thriller.
Wawrinka trailed by a set and then a break at 3-4 in the decider but the reigning US Open champion dug deep to fight another day.
Wawrinka is due for a mouthwatering clash with Nick Kyrgios in the last 16 and the Australian also progressed after thrashing Portugal’s Gastao Elias 6-1 6-2 6-2.
Kyrgios could not resist a slight dig, however, at Federer, who told Fairfax Media the 21-year-old is still not ready to win a major tournament.
“It doesn’t bother me at all,” Kyrgios said. “I know he’s the greatest of all time. I know I just want to do my own thing. I played him once, I beat him.”
Simona Halep fell victim to the first shock after the number four seed was dumped out by American Shelby Rogers. Halep had been one of the favourites to challenge for the title in Melbourne but the Romanian was beaten 6-3 6-1 by Rogers in the tournament’s curtain raiser.
After the match, Halep admitted she was hindered by a bout of tendinitis, which had affected her left knee since the WTA Finals in October.
Meanwhile Angelique Kerber breathed a sigh of relief after the holder edged past Lesia Tsurenko and into the second round. Kerber delivered a stuttering opening performance and looked in trouble when Tsurenko saved a match point in the second set before forcing a decider.
The world number one, however, drew upon all her powers of resilience to win 6-2 5-7 6-2 and set up a meeting with Carina Witthoeft.