England legend Jason Leonard lifted the Parker Pen Challenge Cup on his final Harlequins appearance after Montferrand pressed the self-destruct button at the Madejski Stadium.
Quins secured their place in next seasons European Cup through a sensational try deep into injury time by substitute Simon Keogh, which his fellow replacement Andy Dunne converted to spark scenes of wild celebration.
Quins were outplayed for much of the match, but Montferrand had centre Raphael Chanal sent off in the 78th minute and the 14 men he left behind could not hang on.
Full-back Gavin Duffy scored a first-half try for the Londoners, while fly-half Paul Burke kicked four penalties and Dunne also slotted a penalty.
Montferrand, whose European Cup hopes disappeared with defeat, claimed touchdowns from man of the match Olivier Azam and scrum-half Pierre Mignoni.
Full-back Anthony Floch booted 13 points and fly-half Gerald Merceron dropped a goal, but it will remain a mystery how Montferrand contrived to lose a game they so clearly dominated.
The lead changed hands on several occasions, keeping a 13,000-plus crowd enthralled, yet Quins struck when it mattered most, capitalising on space out wide created by the reckless Chanals departure.
And it gave Leonard, rugbys world record cap holder, a glorious send-off after he went on as a substitute seven minutes from time.