The Ducks looked like they had the game sown up with a 4-1, third-period lead but saw the Red Wings battle back with goals 6:48 apart. Detroit came close to tying the game in the final minutes and Anaheim had to kill two late penalties.
"The third period wasn't pretty," said Selanne, who is making his first trip to the final after 14 seasons. "It was scary. That was the scariest 20 minutes in my career."
Rob Niedermayer scored shorthanded and assisted on Samuel Pahlsson's crucial third-period goal as the Ducks won the best-of-seven series 4-2. Ryan Getzlaf, on the power play, and Corey Perry also scored before a screaming, towel-waving crowd of 17,380.
"I'm happy to be here," said Getzlaf, who is going to the final after just two years in the league. "We needed to win tonight. That was a big effort from our group."
The Wings refused to go down without a fight. Pavel Datsyuk scored two third-period power-play goals, Henrik Zetterberg scored once and Mikael Samuelsson had three assists.
Red Wing coach Mike Babcock said some early mistakes cost his team.
"They got a short-handed goal early and I thought we lost our composure a little bit," said Babcock. "I think we wanted to win so bad it got in the way of our poise and our execution."
Anaheim will open the Stanley Cup final Monday at home against the Eastern Conference champion Ottawa Senators. It will be the Ducks' second trip to the final after losing in seven games to New Jersey in 2003.
The Senators are making their first appearance in the final.
Anaheim goaltender Jean-Sebastien Giguere made one of his best saves in the third, gloving a Johan Franzen shot through traffic just as Detroit was trying to rally. In the second he blocked a Kyle Quincey deflection and got in front of a Zetterberg shot on a power play.
Detroit goaltender Dominik Hasek looked like a target in a shooting gallery early. Both teams had 29 shots on goal.
Anaheim showed early they wanted to end the series and not play a Game 7. They outhustled Detroit and clipped the Wings with some crunching hits.
"We didn't want to go back to Detroit," said Selanne. "You never know what can happen. This was our barn, our fans, our chance."
The Ducks booked their tickets to the final when Perry and Getzlaf scored second-period goals.
Perry notched his second goal in three games on a delayed penalty, making it 2-0. He found the puck during a scramble in front of Hasek and lifted it over the sprawled goalie.
Getzlaf sent the crowd into a frenzy when he made it 3-0 at 18:33 on the power play. Hasek had flattened himself on the ice but the puck popped loose and Getzlaf put it in the net on a backhand.
The Ducks came out flying in the first period and put Detroit on its heels. The effort was rewarded at 3:51 when Niedermayer deflected a Chris Pronger shot from the point past Hasek. The puck hit Niedermayer then just dribbled by Hasek.
It was the third short-handed playoff goal of Niedermayer's career and came with 20 seconds left in a Todd Marchant penalty.
Detroit's frustration showed as the game progressed. In the second period defenceman Danny Markov hammered the glass with his fist after a fan slapped the pane following a play.
Notes - Rob Niedermayer's other two short-handed goals came in the 2003 playoffs in a conference semifinal game at Dallas and the conference finals against Minnesota. . . . Selanne's winning goal Sunday was his first overtime goal since 1993 when he was a Winnipeg Jet and his team lost the first round of the playoffs to Vancouver. . . . Defenceman Francois Beauchemin played 343 games in the minor leagues before he was picked up by Columbus, who later traded him to Anaheim.