Finland joined Sweden, the United States and Canada in the semifinals with the Canadians having been made to sweat out a 2-1 victory over lightly regarded Latvia.
Sweden will meet Finland in Friday's semifinals after the Swedes coasted past Slovenia 5-0 and the Americans, having defeated the Czech Republic 5-2, will take on Canada in a rematch of the gold medal game from Vancouver.
Tuukka Rask, goaltender for the Boston Bruins, made 37 saves in handing the Russians an enormous disappointment. Skating on home ice in the first Winter Olympics ever held in the country, the Russians were under intense pressure to bring home a medal in hockey.
Alex Ovechkin, who leads the NHL with 40 goals this season, was unable to break through in the tournament and Russia also had to endure suspect goaltending throughout the tournament.
Russia also was the victim of a rough ice surface as time wound down in the first period.
In a tie game and with Russia on the attack, the puck came out to the point where Vyacheslav Voinov was waiting to corral it. But it took a hop on a bump in the ice, jumped over Voinov's stick and headed down the rink.
Finland's Mikael Granlund sped in front of Voinov to seize control and moved to the Russian net 2-on-1 with the 43-year-old Selanne.
Selanne, who has scored 682 NHL goals since joining the league in 1992 and is likely playing in his last international tournament, took a pass from Granlund and beat Russian goaltender Semyon Varmalov in the upper right corner.
When Granlund gave Finland a 3-1 lead 5:37 into the second period, Varlamov was replaced in net by Sergei Bobrovsky.
This is the third straight Olympics in which Russia has failed to win a medal. The Russians have not won gold since the breakup of the Soviet Union
Sweden took a 3-0 lead into the third period against Slovenia and Carl Hagelin tacked on two more goals in the one-sided contest. Henrik Lundqvist had to make only 19 saves to get the shutout.
Sweden, the top seed coming out of the group phase of this year's tournament, is trying for its second gold medal in the last three Olympics.
David Backes scored the key goal for the United States in its win over the Czechs. The puck caromed off the springy boards behind the Czech net and Landed on Backes' stick just a few feet from the goal. He lofted a shot over Ondrej Pavelec with just two seconds left in the opening period.
That gave the Americans a 3-1 lead and the advantage eventually grew to 5-1.
Lauris Darzins scored for Latvia to tie Canada at 1-1 late in the first period and the Latvians physical play left their highly-favored opponents frustrated throughout the contest.
Finally, with Canada on the power play, Shea Weber rocketed a slap shot from just inside the blue line that got the best of Kristers Gudlevskis with 6:54 to go in regulation.
Canada outshot Latvia 57-16.
Celebrity Couples of 2014 [PHOTOS]