Castres: (14) 21
Tries: Bouquie 2, Masoe Cons: Teulet 3
Wasps: (10) 15
Tries: Cipriani, Waldouck Cons: Cipriani Pens: Cipriani
Wasps centre Flutey wriggles through but the Londoners were shut out
Wasps crashed out of the Heineken Cup after losing to Castres in France.
The Premiership club needed to secure a bonus-point win against the pool two bottom side to have any hopes of progressing to the quarter-finals.
The two-time champions were unable to top the group after Leinster beat Edinburgh 12-3.
Wasps, who trailed 14-10 at half-time, ended second in the pool but with insufficient points to secure one of the two best runner-up spots.
Their loss, heralding the second straight season they have failed to progress in the competition, meant that Welsh region Ospreys qualified as one of the best-placed runners-up after beating Leicester on Saturday.
Both Toulouse and Bath - whose final match would have been winner-goes-through if Wasps had won - were also guaranteed a last-eight berth.
Wasps looked to be on course when a try from centre Dominic Waldouck handed them the lead 13 minutes from time.
But a host of missed chances before a second try for Thomas Bouquie handed Castres only their second win of the campaign.
Full-back Bouquie opened the scoring in the 14th minute when he dummied his way through the Wasps line and scampered over from 15m, converted by Romain Teulet.
Danny Cipriani slotted Wasps' first points in the 18th minute with a penalty but Castres increased the pressure when Chris Masoe crashed over after bullocking runs from prop Luc Ducalcon and number eight Iosefa Tekori.
Teulet kicked the conversion to open a 14-3 lead after 23 minutes but fly-half Cipriani added a stunning solo try before half-time.
The England star darted to the right of a ruck 10m inside the Castres half, stepped past Masoe and wing Rafael Carballo before racing clear to touch down under the posts.
A number of chances went begging for both sides, with Teulet and Cipriani missing with penalties and Wasps' Rob Webber failing to gather Paul Sackey's inside pass with the try line at his mercy.
Castres hooker Akvsenti Giorgadze also went close but was judged to have been held up over the try line following a length-of-the-field attack.
But Wasps made the home side pay and broke out from the resulting scrum, ending in Waldouck's try at the other end.
Cipriani and Teulet missed another kick each but Wasps hopes were dashed when Mark van Gisbergen knocked on after Dave Walder broke through, and Bouquie added his second four minutes from time.
Wasps coach Shaun Edwards:
"Obviously we are all very disappointed with the result and the fact that we are now out of the Heineken Cup.
"We had lots of chances to win this game but at this level you have got to be able to finish those chances and we didn't do that today.
"It was massively important for us to get to the quarter-finals and we went into the game knowing there were no guarantees.
"But we always knew that Castres are very strong and were always going to be difficult opponents. Getting the bonus point win here would have been exceptional."
Castres: Bouquie, Bonnefond, Kefu, Mazars, Carballo, Teulet, Tillous-Borde; Hoeft, Giorgadze, Ducalcon, Nallet, Capo Ortega, Malonga, Masoem Tekori.
Replacements: Terrain, Staibano, Kulemin, Faure, Senio, Lagardere, Sanchou.
Wasps: Van Gisbergen, Sackey, Waldouck, Flutey, Lewsey, Cipriani, Reddan; Payne, Webber, Vickery, Shaw, Birkett, Worsley, Betsen, Haskell.
Replacements: Ward, French, Skivington, Leo, Simpson, Walder, Voyce.