Sidelined due to a shoulder injury, the former eighth-ranked Austrian hadn't played on the tour since last year's U.S. Open, though he did compete for Austria in last weekend's Davis Cup tie in Ukraine.
Melzer, who raced into a 4-0 lead in the opening set but had to come back from 3-0 down in the second, next plays his top-seeded compatriot Dominic Thiem, who had a bye in the first round.
Jurgen Melzer's younger brother, Gerald, defeated 2011 finalist Albert Montanes of Spain 5-7, 7-5, 6-4 for his first win at the ATP level this year after five opening-round defeats. He trailed Montanes 5-4 in the second set before winning the next five games.
Nikoloz Basilashvili of Georgia won the last four points of a second-set tiebreaker to defeat fifth-seeded Lukas Rosol of the Czech Republic 6-4, 7-6 (4). Rosol failed to serve out the set at 6-5, and conceded a 4-3 lead in the tiebreaker.
Also, sixth-seeded Dusan Lajovic of Serbia, eighth-seeded Jan-Lennard Struff of Germany, Roberto Carballes Baena of Spain, and Adam Pavlasek of the Czech Republic advanced to the second round.