The Austrian second seed outlasted Alexander Zverev in a five-set grind that neither man looked like they wanted to win.
But in astonishing scenes, Thiem completely righted the ship and won the match in five sets.
Battling injury and down a break in the final set, Thiem pulled off the astonishing comeback to win 2-6, 4-6, 6-4, 6-3, 7-6.
It is the first time someone has won the US Open after losing the first two sets in the Open era.
A nervy Zverev had multiple chances to win the championship, but his serve deserted him in the crucial points.