The Japanese underdog, who lost to Murray in the Olympic semifinals last month as the Brit went on to win gold, recovered from a slow start to win 1-6, 6-4, 4-6, 6-1, 7-5 victory.
After struggling to cope with Murray’s strong returning in the opening set, Nishikori battled back after a rain delay to stun the world’s second-ranked player.
The result marks just the second victory for the 2014 finalist over Murray in nine attempts.
MORE: Must-see photos from Arthur Ashe Stadium
A long backhand from Nishikori earned Murray his first break to go 3-1 up, and Murray’s vicious return of serve saw him power to a swift first-set victory.
Murray’s dominance of the opening set faded in the second, even though he made the first break. Nishikori immediately pegged him back in a pattern that would become a recurring theme. After a pause for the roof to be closed, Nishikori leveled matters as Murray found the net following a long rally.
Nishikori appeared to have the crowd on his side against a visibly frustrated Murray.
The No. 6 seed twice came up with an immediate response to Murray breaks during a tight third set, but the Olympic champion made a third gain stick and held serve to go back in front. Having started with a dominant first-set victory, Murray’s match was flipped on its head when Nishikori claimed the fourth by the same score line as part of a seven-game winning run.
Murray finally stemmed the tide by holding serve to pull back to 2-1 in the decider and he converted a second break point to pull level.
MORE: U.S. Open winners since 2000
It proved to be brief respite for Murray, though, as Nishikori fired a winner down the left to regain the advantage, but a match of twists and turns had another twist, and turn, to come. Murray’s break to level at 4-4 had the feel of a moment that could shift the momentum in his favor, yet Nishikori — chasing just a second grand slam semifinal appearance — would come again.
A double fault from Murray handed Nishikori a break point that was duly converted to the fury of the Wimbledon champion, and the 26-year-old held serve to wrap up a memorable win.
Nishikori will face Juan Martin del Potro or Stan Wawrinka for a place in the final.
STATISTICAL BREAKDOWN Nishikori (6) def. Murray (2]) 1-6, 6-4, 4-6, 6-1, 7-5
WINNERS/UNFORCED ERRORS Nishikori - 48/60 Murray - 29/46
ACES Nishikori - 1 Murray - 8
BREAK POINTS WON Nishikori - 9/13 Murray - 8/15
FIRST SERVE PERCENTAGE Nishikori - 60 Murray - 55
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE Nishikori - 72/43 Murray - 69/39
TOTAL POINTS Nishikori - 142 Murray - 130