Tension in harlequin as the head coach is going to resign and…
The lead changed several times in the second half but Tyrone Green’s try, converted by Marcus Smith, proved to be enough despite the hosts scoring again.
Madosh Tambwe grabbed his second try but Maxime Lucu missed the conversion that would have brought victory.
Quins will face Toulouse or Exeter in the semi-finals.
Bordeaux had thrashed Premiership champions Saracens twice during this season’s Champions Cup and were favourites to win at Stade Chaban-Delmas.
But in an incredible game of 12 tries, Harlequins showed superb resilience in the second half after Bordeaux fought back from a 28-12 half-time deficit to lead with 15 minutes to go.
“I am just so proud of them, not surprised, because I know the capability of the group,” said director of rugby Billy Millard. “It was quite emotional for us.”
Quins captain Stephan Lewies added: “The job is not done yet.
“There is so much room for improvement, and as much as we will enjoy this there is more in the group.
“Days like this don’t happen often. A few beers now, and then we will be back in.”
Resilient Quins seal epic win
Will Porter scores for Harlequins
Will Porter started at scrum-half in the absence of Danny Care
Two early scores gave Quins a 14-0 lead, with Smith converting the first of Will Porter’s two tries before a penalty try was awarded for a deliberate knock-on by Bordeaux’s Pablo Uberti.
Lucu and Romain Buros then crossed to reduce Quins’ lead to two points but Porter then added a brilliant second after a chip-and-chase.
Will Evans added another try and, when Smith landed his fourth successful conversion on the half-time whistle, Harlequins were 28-12 ahead.
Bordeaux’s Nicolas Depoortere grabbed his side’s third try early in the second half after the centre’s sublime take just above his boots, and a Lucu penalty made it 28-22 to Quins.
Alex Dombrandt scored Quins’ fifth try off the back of a line-out, but Louis Bielle-Biarrey’s converted try reduced the gap again.
The home side took the lead for the first time when Bielle-Biarrey collected his own kick ahead before feeding substitute Tambwe for his first try, but Quins hit back once more when Green dotted down.
Smith’s conversion gave Quins a six-point lead at 42-36 with only a few minutes remaining, but when Tambwe touched down near to the posts to give Lucu an easier looking conversion, it looked like the hosts would reach their second Champions Cup semi-final.
But the Bordeaux captain’s kick was just to the wrong side of the right-hand post and Quins were able to see out a frantic final two minutes to seal an epic win that clinched their spot in the last four for the first time.