It was, fittingly, the longest match of the tournament, at 4 hours, 18 minutes.
After seven trips to the fourth round of a major, the 29-year-old Anderson is through to his first career quarterfinal.
"I'm a little lost for words," Anderson said in his on-court interview. "I just managed to keep my composure and, honestly, played one of the best matches of my life.
"To do it here in New York feels amazing."
Murray previously had reached the quarterfinals of the 18 consecutive Grand Slam tournaments he had played; his last failure came here five years ago when he lost to Marin Cilic in the third round.
It was only the second time in his career that Murray lost a tiebreaker 7-0.
"Disappointing to lose because of that,'' Murray said about his earlier-than-usual exit. "Obviously that's many years' work that's gone into building that sort of consistency.''
Anderson, laboring heavily in the final hours of Labor Day, started cramping early in the fourth set but put together a brilliant, technically perfect tiebreaker when he needed it most.
Anderson faces No. 5 seed Stan Wawrinka, a winner over American Donald Young in four sets, in a Wednesday quarterfinal.
"It's not easy playing Andy," Anderson said. "He's such a fighter. I knew I had to try my best to stick with him. I served very well, obviously."
Obviously. Anderson finished with 25 aces and, perhaps more importantly, won 79 percent of his first-service points. With the score 5-0 in the ultimate tiebreaker, he cracked his hardest serve of the night, a 138 mph ace that barely grazed the white line.
Anderson also managed to save eight of the 11 break-point opportunities Murray had against him. Meanwhile, Anderson was able to convert four of his nine chances.
Back in July, the No. 15-seeded Anderson ran off with a two-set lead on No. 1 seed Novak Djokovic at the same stage at Wimbledon but couldn't close the deal. Djokovic leveled the match at two sets before the match was suspended due to darkness. The next day, he won the ultimate set 7-5.
Monday's match was played on Louis Armstrong Stadium before a rowdy, raucous capacity crowd. The end of the third set, already into the fourth hour of the match, was a frantic affair.
As the match progressed, it appeared fatigue was becoming a factor for the 6-foot-8 Anderson. Coming into the US Open, Anderson won the title at Winston-Salem. The match against Murray was his ninth in 14 days, and his set count is now at 25.
Anderson will play Wawrinka in his 10th match in 16 days.
Anderson eliminates Murray from US Open
Kevin Anderson defeats Andy Murray (7-6, 6-3, 6-7, 7-6) at the US Open to reach his first career Grand Slam quarterfinal.
Murray reflects on fourth-round loss
Andy Murray discusses his fourth-round loss to Kevin Anderson at the US Open and how playing in Louis Armstrong Stadium is different from being in Arthur Ashe Stadium.
Anderson: 'One of the best matches of my life'
Kevin Anderson talks about his four-set win over Andy Murray in the fourth-round at the US Open.