Sorenstam eagled the par-4 17th to move into second place. The Swedish Hall of Famer took a double-bogey on the last hole, hitting her tee shot into the water and three-putting.
Sorenstam, the tournament host, shot 72 and finished seven strokes back to tie for sixth with three other Swedes. She was greeted by a packed gallery on the 18th green.
I decided to forget that I hit the ball in the water, Sorenstam said. I enjoyed seeing the fans making the wave and applauding when I went up to the green. It felt really good.
The 19-year-old Yang captured her second win as a professional in the rain-shortened 54-hole tournament with a 14-under 202 total at the Frosaker Golf and Country Club.
I never thought I could win the tournament, said Yang, who accepted the trophy and a hug from Sorenstam. The leader was four shots ahead of me, so I thought Id just go out and have fun. Im very happy.
Yang birdied seven of 10 holes from the third to move atop the leaderboard. She stayed there, finishing with birdies on the last three holes. Her only bogey came on the second hole.
Minea Blomqvist of Finland set the course record (63) earlier in the day. She shared second with Melodie Bourdy of France (66), overnight leader Lill Saether of Norway (73) and Maria Hjorth of Sweden (72) in the European Ladies Tour event.
Saether and Hjorth set the course record with 64s on Saturday. Sorenstam had lowered the record to 66 on Thursday.
Yang won the ANZ Ladies Masters at 16 in 2006, becoming the first amateur to win a major womens pro tournament in Australia. Her first pro win came at the Ladies German Open in June.
Joining Sorenstam at 209 were Liselotte Neumann (66), Louise Friberg (69) and amateur Anna Nordqvist (71). American Jill McGill (71) tied for 13th. Catriona Matthew of Scotland did not defend her title.
Yang played the first two rounds of the tournament with Sorenstam, her idol.
I was nervous. I hardly dared to talk to her, Yang said. Before the tournament, I wanted Annika to win it. Shes my favorite player.
Sorenstam won the tournament six times from 1997-2006 when it was the Compaq Open, HP Open and Scandinavian TPC Hosted by Annika. Sorenstam, who will retire at the end of the season, acknowledged the Swedish fans for the final time.
Naturally, it was special to walk out there today, Sorenstam said. I knew this was my last tournament in Sweden. Im enormously thankful for the fans support this week.
The 37-year-old Sorenstam, a winner of 10 majors and 72 LPGA titles, plans to get married, start a family and focus on business and golf interests.
She will make her final competitive appearance in Europe on Sept. 5 in Denmark. Her last start will be at the Dubai Ladies Masters on Dec. 11.