After a tight and tense 2-2 in regular time and a deadlocked overtime period, Slovakia won in the penalty shootout.
The USA are out and Slovakia will play the winner of ROC-Denmark in the semi-final.
It's an incredible moment for Slovakia who started the tournament poorly with two defeats in their first two games - a 6-2 loss to Finland and a 4-2 loss to Sweden.
But they managed to tighten things up and stunned reigning Olympic silver medallists from PyeongChang 2018 Germany 4-0 in their qualification playoff on Tuesday.
USA were tagged as favourites when they beat Canada in the prelims but Slovakia made life very difficult for a talented, youthful USA team, withstanding an early American onslaught to score first in the 12th minute.
At 17 years of age, Slafkovsky is one of the breakout stars of the Games, and his goal gave the Slovaks the confidence to begin dominating the U.S.
But just when it looked like the underdogs might head into the locker room with a goal advantage, up popped Nick Abruzzese to find Rybar's five-hole less than a minute before the end of the first period to tie things up.
The second period began just as tight with the Slovaks outshooting the U.S. but on 11:04 Sam Hentges collected out front, spun, and found the bottom corner with a backhand.
The USA went in leading at the end of the second period despite being outshot 13-6 by their surging opponents.
Beniers hit the post halfway through the third period, so close to his opening goal in Beijing, and Slafkovsky was denied by Mann with a sharp save, but the 3rd period deadlock continued.
With the U.S. 44 seconds from the semi-final, captain Marek Hrivik stepped up and levelled it at 2-2 to send the game into overtime. The Slovakian bench erupted in celebration.
Ten minutes of overtime yielded no goals thanks to great work from Rybar, and he would be the hero of the shootout too, shutting out the U.S. with four penalty saves, and they missed one.
"Words just can’t describe how I feel right now, it’s a real tough pill to swallow," said USA Coach David Quinn after the loss.
"I thought as the game went on we got away from doing the things we needed to do to have success. I thought we tried to force plays offensively, really fueled their offence and you could really feel the momentum change.
"To me the five-on-three was the turning point of the whole game. We had the chance to go up five-to-three and we just couldn’t do it.
"It was such an incredible group of players to coach and it just really stings that it’s over."
The dream of a first ever Olympic medal for Slovakia is just one win away.