Fernanda Rodrigues' ace set up captain Fabiana Claudino's kill for the 24-26, 25-22, 19-25, 25-22, 21-19 victory. Even Brazil's coaches joined in an emotional post-match celebration at Earls Court.
Brazil advances to Thursday's semifinal against Japan, which outlasted China 3-2 (28-26, 23-25, 25-23, 23-25, 18-16) in an earlier quarterfinal match Tuesday.
Sheilla Castro scored 27 points for second-ranked Brazil, which has advanced to the semifinals in the last seven Olympics. The team's only gold medal came at the Beijing Games when they went undefeated and defeated the United States 3-1 in the final.
Liubov Shashkova scored 28 points for ninth-ranked Russia, which has won four gold medals in women's volleyball since the sport joined the Olympics sport in 1964, but none since 1988.
Brazil's Fernanda Ferreira badly missed on her swing for a kill to give Russia the advantage 24-23 in the first set. Castro's spike went wide to give the set to the Russians.
Brazil rallied to go up 12-7 in the second set as Thaisa Menezes spiked for set point.
Midway through the third, when Claudino served into the net and subbed out, Jose Guimaraes pulled her aside to offer encouragement.
Castro's wide spike gave Russia a 12-11 lead and Liubov Shashkova's kill extended it to 19-15 before her block won the set.
Brazil trailed by as many as four points early in the fourth, but rallied to go ahead 9-8. Playing with emotion and wildly cheering each point, the Brazilians contrasted the more serious Russians.
Menezes spike set up set point but then she served into the net. Claudino's block sent the match to a deciding set.
Brazil defeated the Russians in straight sets in Beijing. The two teams have each won three matches against each other in Olympic competition.
The two teams also battled memorably in the 2010 world championships final, with Russia earning the 3-2 victory. Brazil bested Russia in their last meeting in the 2011 World Grand Prix semifinals.
Late last year Brazil surrendered its four-year hold on the No. 1 ranking to the U.S. women's team. But the Brazilians were still considered a medal threat in London.
Then Brazil unexpectedly struggled in the preliminary round, going 3-2 with losses to the top-ranked U.S. women and a three-set upset by South Korea. They needed a victory over Serbia in the round's final match to advance.
Russia was undefeated in the preliminary round to clinch the top seed in its pool.