The Austrian, who has dropped to 417th after a five-month layoff following shoulder surgery, played only his sixth match of the season at ATP level.
In front of a home crowd of 7,500, Melzer broke the 14th-ranked Bautista Agut when the Spaniard served for the second set at 5-4, and added another break to close out the win.
Melzer, who won the event in 2009 and 2010, joined fellow Austrian Dominic Thiem in the second round. The third-seeded Thiem defeated Jurgen's younger brother, Gerald Melzer, 6-0, 6-3.
Thiem, who had not won a match in his home event since reaching the quarterfinals in 2013, conceded just eight points in a 20-minute opening set, and broke his opponent for a fourth time at 4-3 in the second set.
Thiem next plays Viktor Troicki of Serbia, who converted the only break point in the final set to complete a 4-6, 7-6 (5), 7-5 comeback win over Kevin Anderson of South Africa.
The fifth-seeded Spaniard was a service break up at 3-2 when his British opponent, who is ranked a career-high 40th, quit the match. Edmund had beaten Ferrer on the way to his first-career semifinal appearance in Antwerp last week.
Ferrer next plays Joao Sousa of Portugal, who led Pablo Cuevas 6-3, 3-0 when the Uruguayan pulled out with an apparent knee injury.
Also, 2011 champion Jo-Wilfried Tsonga had 11 aces and avoided break points while beating German qualifier Benjamin Becker 6-3, 6-4.
Also, Feliciano Lopez, who won his maiden title in Vienna in 2004, saved a match point before taking the last three games in a 6-4, 2-6, 7-5 win over seventh-seeded Lucas Pouille. Lopez will play John Isner of the United States in the second round.