The Rebels threw everything at the Stormers but were unable to send their retiring skipper Stirling Mortlock out a winner, losing 26-21 in Cape Town.
The lowly Rebels got to within two points in the final 10 minutes against the Super Rugby front-runners but the home side showed their class and super-boot Peter Grant kicked a final penalty to cap the win.
With only two losses for the home and away season, the Stormers earned a home semifinal next weekend and a home final should they win.
Melbourne, who finished the season 13th, were out to post their first win in South Africa after going so close against the Lions in Johannesburg last round.
"The intent was excellent but our execution at times let us down," Rebels coach Damien Hill said.
"There was just one or two opportunities in attack and a couple of lapses in defence which were the difference."
The Stormers led 16-0 at halftime, but tries within three minutes from prop Rodney Blake and halfback Nick Phipps whittled the lead to two points.
The Stormers responded with centre Juan De Jongh scoring his second try of the match, but the Rebels gave themselves a shout when replacement Cooper Vuna scored with eight minutes left.
Former Wallabies skipper Mortlock, 35, announced last month he planned to hang up his boots at the end of the Super season and the Rebels were also farewelling a number of other players.
Lock Al Campbell is also retiring, while veteran fullback Julian Huxley is headed to France and centre Mark Gerrard to Japan.
The Sharks booked their playoff place running in four second-half tries to beat the Cheetahs 34-15.
The Sharks needed to win by at least five points to advance, and looked vulnerable at halftime when they trailed 15-6.
However, winger JP Pietersen masterminded a superb turnaround in the second half, setting up two of the home side's tries to secure a playoff berth for a second straight year and eliminate the Hurricanes.
The Sharks, who have reached three finals and never won, will travel to Brisbane to meet the defending champion Reds.
In Pretoria, the Bulls clinched the last playoff spot with a 37-20 win over the Lions. It was 20-all at halftime but halfback Francois Hougaard and flanker Jacques Potgieter scored tries for the Bulls early in the second half for them to ease away.
Wings Akona Ndungane and Bjorn Basson scored first-half tries for the Bulls while halfback Michael Bondesio and No8 Josh Strauss dotted down for the Lions, with first five-eighth Elton Jantjies converting both and kicking two penalties.
Bulls kicker Morne Steyn bagged four conversions and three penalties.