Number two seed Thiem appeared to be heading towards victory after taking a two sets to love lead on the Louis Armstrong Stadium.
Munar abandoned before the start of the third set, with Austria's Thiem leading 7-6 (8/6), 6-3.
Thiem, 26, is chasing a first-ever Grand Slam singles title after a series of near-misses in recent years.
The Austrian right-hander lost the final of the Australian Open earlier this year and was also beaten in the final of the French Open in 2018 and 2019.
He has never gone beyond the quarter-finals of the US Open, where he reached the last eight in 2018.
Thiem now faces India's Sumit Nagal in the second round.
Nagal became the first Indian man since 2013 to reach the second round of a Grand Slam event with a 6-1, 6-3, 3-6, 6-1 win over Bradley Klahn of the United States.