Membrey marked about 40 metres out from goal but his attempt at a match-winning goal faded agonisingly to the right, with the Bulldogs prevailing 14.12 (96) to 14.9 (93) at the MCG on Friday night.
Luke Beveridge's men advance to an elimination final next week, while the Magpies' finals campaign is over.
A huge crowd of 81,036 was on hand for the historic knockout clash as the eighth and ninth-ranked teams traded blows in a fiery battle.
Raging Brownlow Medal favourite Nick Daicos (30 disposals, two goals) did everything he could to drag Collingwood over the line.
But Marcus Bontempelli (32 disposals, one goal), Matthew Kennedy (27 touches) and Ed Richards (25) gave the Bulldogs midfield ascendancy as Aaron Naughton and Arthur Jones fired in attack.
The pair of forwards kicked four goals each, with Jones snapping what proved to be the decisive major deep into time-on of the final term.
It marked the fourth lead change in a gripping conclusion to a messy, yet enthralling contest before Membrey's critical miss at the end.
Kennedy was hurt in a final-quarter collision and was ruled out of the latter stages of the match - as well as next week's elimination final - with concussion.
Bailey Dale (24 disposals) was influential at half-back for the Bulldogs.
Dan McStay kicked four goals for Collingwood, with Sam Swadling (32 disposals) and Josh Daicos (26) busy.
The Magpies' defeat brought down the curtain on premiership hero Steele Sidebottom's career, with doubt over injured games record holder Scott Pendlebury's playing future.
The higher-ranked Bulldogs were forced by the AFL to play their 'home' final in enemy territory because of the MCG's significantly higher crowd capacity and felt further aggrieved when McStay was awarded an early mark despite appearing to juggle the ball over the goal line.
It led to a Collingwood goal during a frenetic opening term, which featured five lead changes and a raft of stoppages.
Daicos slotted his first major on the run and Charlie West produced a remarkable soccer-style goal when he flicked the ball with the outside of his right boot through Buku Khamis' legs.
But it was the Bulldogs who led by one point at the first break and threatened to break the game open in the second quarter.
Bontempelli brought the house down when he punished a Daicos turnover, accepting a pass and sidestepping his opposite number before kicking truly.
The skipper starred as the Dogs dominated centre clearances and grew their margin to 20 points, before two late Collingwood goals trimmed it to 10 at the main break.
McStay's fourth major got them back within a kick but the Dogs responded with the next three goals to reclaim the ascendancy.
Dogs tall Ryan Gardner spent the entire first half on the bench and came on 12 minutes into the third quarter to give Tim English some relief in the ruck.
Marquee men Bontempelli and Daicos went toe to toe in the middle to start the final term and Angus Anderson twice kicked goals that brought Collingwood back within one point.
The Pies finally snatched the lead when Jack Crisp waltzed out of a centre clearance to put them in front from outside 50 metres.
It was the first of four lead changes in time-on before Membrey's miss after the siren.
The Bulldogs will find out who they play in next week's elimination final after Saturday night's other wildcard final, between Melbourne and Carlton, also at the MCG.