World number 36 Schwartzman seized the initiative against the seventh-ranked Austrian, who fell at the first hurdle after enjoying a first-round bye yesterday.
On the defensive early, Thiem held on to level the match at a set apiece on his fifth set point of the second-set tiebreaker.
And the 23-year-old appeared to have gained control when he powered to a 5-2 lead in the third set.
But Schwartzman wouldn't go away, saving two match points on his serve at 3-5, another in the next game and yet another as he served to take the set to 5-5.
Also Read
Schwartzman's wasn't the only great escape of the day.
Canadian teenager Denis Shapovalov saved four match points en route to a three-set victory over Rogerio Dutra Silva in their first-round encounter.
The 18-year-old trailed 4-6 in the second-set tiebreaker but saved all four match points he faced to force a third set.
"I don't remember all of them. Honestly, it's a little bit of a blur," Shapovalov said.
"I just told myself, he's got to win it from me, I'm not going to give it to him. I think I did a good job to stay tough out there."
Shapovalov broke Brazil's Dutra Silva in the seventh game of the third and went on to close out a 4-6, 7-6 (10/8), 6-4 victory.
With old-guard stars Rafael Nadal and Roger Federer taking a day off -- 19-time Grand Slam champion Federer to celebrate his 36th birthday -- Shapovalov was one of a wealth of young talents to shine on Tuesday.
South Korean 21-year-old Chung Hyeon withstood 16 aces to beat 2014 semi-finalist Feliciano Lopez 6-1, 4-6, 7-6 (7/3).
After the third set went to the tiebreaker without a break of serve, the 56th-ranked Chung built a 4-2 advantage and went on to secure the victory in two hours and 16 minutes.
- Coric books Nadal match -
===========================
Croatian 20-year-old Borna Coric breezed past Russian lucky loser Mikhail Youzhny 6-2, 6-4 to set up a second-round meeting with top-seeded Nadal.
Coric has won two of three prior encounters with the Spanish great, who won a 10th French Open title this year and can regain the world number one ranking with a run to the semi-finals this week.
American Ernesto Escobedo, 21 years old and ranked 85th in the world, got his chance as a lucky loser when 10th-seeded Czech Tomas Berdych withdrew with a rib injury.
In other first-round matches American Sam Querrey defeated Vincent Millot for the second time in as many weeks, peppering the French qualifier with 18 aces in a 4-6, 7-6 (7/4), 7-5 win. Querrey beat Millot in the quarter-finals at Los Cabos en route to his 10th ATP title.
American Jack Sock, seeded 15th, also advanced, downing France's Pierre-Hugues Herbert 7-6 (7/4), 6-3.
Disclaimer: No Business Standard Journalist was involved in creation of this content