Kung won 1-up as Sorenstam missed a 5-foot par putt on the final hole.
'I made a few mistakes on the last four holes,' admitted Sorenstam. 'Sometimes there's not much you can do. Candie played really good and sometimes it doesn't go your way. I think that's what happened on the last hole.'
Sorenstam got relief from a sprinkler head right of the short grass, then putted 5 feet past the hole. Kung lagged her putt from the left side to tap-in territory and was conceded par.
Sorenstam blew her putt by on the right side and it was Kung who moved to Sunday's semifinals.
'I couldn't believe she missed that, but I'm going to play tomorrow,' said Kung.
Kung will face Marisa Baena, No. 60, in one of Sunday's semifinal matches. Baena knocked off 29th-ranked Karrie Webb, 2 and 1.
Meena Lee also benefited from a missed short putt on the final hole in her quarterfinal match. Pat Hurst, the 39th seed, hit the side of the cup from 3 feet on the 18th to lose, 1-down to the No. 47 seed.
Lee will meet Wendy Ward, the 14th-ranked player, in the semifinals. Ward bested No. 59 Sophie Gustafson, 2 and 1.
Sorenstam built a 2-up lead with a 25-foot birdie putt at the 12th and a 5-footer at No. 13. Kung answered with a 12-footer at the 15th. Sorenstam had a chance to halve the hole, but her try from 10 feet missed.
Kung drew even at No. 16. A bad drive by Sorenstam led to bogey, then Kung nearly won the 17th, but her birdie putt lipped out of the hole.
Kung closed it out on 18 giving her the upset, although not as big an upset as some might think. Kung is eighth on the LPGA Tour money list and is a three- time winner on tour.
'I really don't feel like I put extra pressure on myself,' said Kung. 'I felt pretty confident with my game and feel like I'm up there with her. I hit my shots closer than her pretty much all day long.'
Baena never trailed in her match with Webb and was 1-up at the turn. Webb came up short in the fringe with her third at the par-5 14th, while Baena's ball stopped 10 feet from the hole. Webb missed her try and Baena converted her putt to move 2-up.
Webb made a mess of the par-4 15th as she went from the left rough into a greenside bunker. She made bogey and fell 3-down with only three to play.
The Australian made things interesting at 16. She hit her approach to 5 feet, while Baena was over the green with her second. Baena's chip came up 3 feet short of Webb's ball so Baena conceded the hole and moved to the 17th.
Webb's 4-iron landed in a right, greenside bunker and Baena played to the center of the putting surface. Webb blasted out to 5 feet and Baena lagged up just inside Webb, who rolled in her par putt. Baena sank her short par-saver to move into the semifinals.
Hurst evened the match at the 13th, then drained an 8-footer at No. 14 to win the hole and go 1-up. Lee rolled in a 10-foot birdie putt to square the match at 15, then Hurst missed a nine-footer to lose the 16th and fall 1-down.
The players halved 17 although Hurst's 20-footer that could have squared the match came up a foot short. At 18, Lee's second came up 65 feet short. Her birdie try came up 12 feet short and Hurst, who missed the green with her approach, chipped to 3 feet. Lee's par try never touched the hole, but Hurst hit her short putt too hard and missed right.
Gustafson built a 2-up lead around the turn thanks to a 7-foot eagle at the ninth. Ward won No. 10, then rolled in a 20-footer for birdie at 11 when two putts could have won the hole.
Ward took the 13th when Gustafson had trouble getting out of a bunker. Ward extended her cushion when she won No. 15, then the duo parred in to give Ward the match.