Stephens, only 19 and without a tournament victory, held her nerve in unbearable tension at Rod Laver Arena to close out a 3-6 7-5 6-4 win after Williams needed treatment for back spasms.
\"This is so crazy,\" said Stephens, who used to have a poster of Williams on her bedroom wall. \"I think I\'ll put a poster of myself up now.\"
Stephens, 19, regarded as Williams\' successor as the force of women\'s tennis in the United States, now goes into a semi-final against world number one and defending champion Victoria Azarenka, who beat Svetlana Kuznetsova.
Williams, 31, had not been beaten since August and picked up titles at Wimbledon, the Olympics and the US Open last year, but she now sees her bid for a calendar-year Grand Slam fall at the first hurdle.
She also falls one short match of equalling her best-ever winning streak of 21 matches, and is denied the chance to become the oldest world number one since the rankings were first devised in 1975.
But she said she was \"almost relieved\" her tournament was over after rolling her ankle just minutes into her first match in Melbourne, a problem which she believes had the knock-on effect of straining her back.
\"Absolutely,\" she said, when asked if it was the worst time she had had at a Grand Slam.
Williams won the first set but at 3-4 in the second, she pulled up with back spasms and later called for the trainer. Serving at half-pace, Stephens was eventually able to capitalise as she levelled at a set each.
Williams recovered sufficiently to break in the tense decider but Stephens broke back and then broke again to claim the victory of her life.
In tomorrow\'s semi-finals, Stephens will face top seed Azarenka, who came through a marathon, 1hr 17min opening set against Kuznetsova before completing her 7-5 6-1 triumph in 1hr 47min.
The first game was a drawn-out scrap, lasting eight minutes and going to Russian comeback queen Kuznetsova, a two-time major-winner who is making a successful return from injury.
She survived pressure in her opening two service games and broke Azarenka in a fourth game that stretched to 15 minutes and included 10 deuces. After 34 minutes, only four games had been completed, with Kuznetsova leading 3-1.
Azarenka then trailed 1-4 but she broke back to 3-4 as errors crept into Kuznetsova\'s previously steady onslaught. Another break gave Azarenka a 6-5 lead and she held her nerve to close the set.
The Belarusian began motoring to victory when she broke Kuznetsova\'s opening serve of the second set. She immediately conceded her own serve, but another break was exchanged and that was the end of Kuznetsova\'s resistance, as Azarenka finished the match with a barrage of groundstroke winners.
\"She played really well throughout the whole match,\" Azarenka said. \"At the beginning, it took adjustment because she plays such a different game.
\"I\'m glad I fought through and produced my best tennis when it was needed.\"
Murray strolls into last four at Melbourne Park
Andy Murray ruthlessly dismissed unseeded Frenchman Jeremy Chardy 6-4 6-1 6-2 to reach the Australian Open semi-finals for the fourth year in a row on Wednesday.
The third seeded Briton had spent just over seven hours on court in his previous four matches and only needed another 111 minutes to complete a one-sided hammering of the world number 36.
Chardy had won the last meeting between the two in Cincinnati in August but another upset was never on the cards and the U.S. Open champion wrapped up victory when the Frenchman ballooned a forehand into the sky on Rod Laver Arena.
Murray, runner up at Melbourne Park in 2010 and 2011, will play the winner of the final match of the day between Roger Federer and Jo-Wilfried Tsonga in the semi-finals.