Anderson endured a three-hour rain delay and saved a match point before firing his 21st ace to finish off seventh-ranked Thiem.
Anderson endured a three-hour rain delay and saved a match point before firing his 21st ace to finish off seventh-ranked Thiem 6-3, 6-7 (6/8), 7-6 (9/7) after two hours and 46 minutes and reach the Washington hardcourt quarter-finals.
"He broke me a couple of times in the third set and I made a couple big serves," said Anderson. "I did a great job of making first serves and I was able to come back."
Thiem, in his first hardcourt tuneup for the US Open, fell to 0-6 lifetime against Anderson, all on hardcourts, but managed to swipe a set from his 45th-ranked nemesis for only the second time in his career.
"I don't like to play big servers in general. What can I do? The draw was not great with him in the second round," Thiem said. "It's one of those bad losses. It can't go my way all the time. It isn't easy to make this change (to hardcourt) after a long break."
Nishikori, the 2015 Washington winner, beat three-time champion Juan Martin Del Potro 6-4, 7-5, for only his second victory in seven matches against the Argentine 13th seed.
"We both missed a little bit in the first set, but second set, I played great," said Nishikori. "Especially I was returning well."
It was the second early morning finish in as many matches for Nishikori, who faces US wildcard Tommy Paul next.
"It's a bit crazy," Nishikori said of the schedule. "It's not easy to recover well. It's a late match tomorrow so I'll be ready."
Paul, who has never faced Nishikori, has ousted seventh seed Lucas Pouille and 11th seed Gilles Muller.
"He's playing pretty well," Nishikori said. "He has a great serve and big forehand."
Russia's Daniil Medvedev upset Bulgarian fourth seed Grigor Dimitrov 6-4, 6-2, to reach a last-match matchup with Germany's eighth-ranked Alexander Zverev, who beat American Tennys Sandgren 7-5, 7-5 just before 2 a.m. after killing time with a nap and video games.
"It didn't feel as long as it actually was," Zverev said.
Anderson saved a match point when Thiem netted a backhand to level the last tie-breaker at 6-6, then hit a forehand winner to set up a match point that Thiem erased with a service winner.
But Thiem sent a backhand wide on the penultimate point and Anderson blasted an ace wide to reach his fourth Washington quarter-final, matching his best result.
"It was a pretty good match overall. I'm satisfied with my game," Thiem said. "I didn't feel that great on my serve. I had some problems with my percentage. I just didn't get the feel of the serve."
After an early exchange of third-set breaks, Anderson double faulted on a break point to hand Thiem a 4-3 edge. But Thiem was broken in the 10th game while serving for the match.
"If you break Anderson twice in one set, you have to win it," Thiem said. "If I would have served batter I could have saved it in the third set."
Next up for Anderson is 200th-ranked Indian qualifier Yuki Bhambri, who eliminated Argentina's 100th-ranked Guido Pella 6-7 (5/7), 6-3, 6-1.
"Hopefully I can win a few more matches here," Bhambri said. "I'd like to break back into the top 100 by the end of the year and play as many big events as possible."
Anderson has never shared a court with Bhambri except in workouts.
"I've practiced with him before but that was a few years ago. He comes in and attacks. It's a challenge," Anderson said. "If I'm taking care of business on my side of the ball, then I give myself the best chance."
Canadian third seed Milos Raonic, the 2014 Washington champion, defeated Cypriot Marcos Baghdatis 7-6 (9/7), 6-3 to book a Friday quarter-final against US eighth seed Jack Sock, who downed countryman Jared Donaldson 7-6 (8/6), 6-2.