Andrey Kuznetsov of Russia beat Stakhovsky 7-5, 3-6, 6-2 as the two unseeded players opened the clay-court event.
The 99th-ranked Stakhovsky beat Federer in four sets in the second round of Wimbledon last month, then lost to Juergen Melzer.
The Ukrainian followed that with a first-round loss in Bstaad, Sweden, and another in qualifying in Hamburg, Germany.
Federer, who lost in the Hamburg semi-finals, will play in Gstaad for the first time since winning the title in 2004.
The fifth-ranked Swiss has a first-round bye and is scheduled to begin Thursday against either Marco Chiudinelli, his childhood friend, or Daniel Brands of Germany in the second round.
Lukas Rosol, best known for ousting Rafael Nadal in the second round at last year's Wimbledon, was the only seeded player to lose Monday.
The seventh-seeded Czech went down 6-2, 6-4 to Marcel Granollers of Spain.
Fifth-seeded Feliciano Lopez beat another Czech, Jan Hernych, 7-6 (2), 6-3, and sixth-seeded Mikhail Youzhny defeated Paul-Henri Mathieu of France 6-3, 4-6, 6-2.
Results on the first day of the Swiss Open here on Monday (x denotes seeding):
Andrey Kuznetsov (RUS) bt Sergiy Stakhovsky (UKR) 7-5, 3-6, 6-2
Marcel Granollers (ESP) bt Lukas Rosol (CZE x7) 6-2, 6-4
Feliciano Lopez (ESP x5) bt Jan Hernych (CZE) 7-6 (7/2), 6-3
Mikhail Youzhny (RUS x6) bt Paul-Henri Mathieu (FRA) 6-3, 4-6, 6-2