Troicki took down eighth seed Thiem, tipped as a name of the future, with the win helping to boost the Serb's fragile confidence after being granted a wild card entry after seeing his ranking plummet following his suspension.
Troicki, now 847th in the world, received a 12-month ban for delaying a mandatory blood test at Monte Carlo in April 2013 by a day, saying he felt ill.
Despite having blood drawn a day later, he was banned for a year amid protest from Serbian Davis Cup teammate Novak Djokovic.
"It was very emotional, very strange for me," said Troicki.
"I want to thank the organizers for this wild card, which means a lot to me."
Troicki said the past year was the toughest of his life.
"It's very emotional to be back and see all of the guys," he said.
"I felt some tightness in my game and pressure as I played this first match.
"I'm very happy that I'm through and that I won.
"I"m hoping to get back to where I was before the suspension."
Despite his defeat by Troicki, 20-year-old Thiem will break into the top 50, becoming the youngest member in that category.
The Gstaad debutant secured his best ranking after reaching the third round in Hamburg last week.
"It was a tough first-match draw, Victor was not injured and not sick for a year, so he could train all the time," said Thiem.
Argentine fifth seed Federico Delbonis began with a victory on a day where play was delayed by rain, beating German Dustin Brown 6-3, 6-3.
Argentine Juan Monaco put out Victor Hanescu 6-4, 7-5 while Kazakh Andrey Golubev advanced over Spain's Inigo Cervantes 3-6, 6-3, 7-6 (7/4).