Castres scored two second-half tries in the space of five minutes to wrestle victory away from Edinburgh at Stade Pierre Antoine on Saturday.
Edinburgh put in a brave display but returned from France with nothing more than a losing bonus point.
The Scottish outfit will feel aggrieved to have lost having more than matched their opponents for long periods, but the game turned on the second half sin-binning of Fraser McKenzie.
After the lock had been shown a yellow card just before the half hour mark, Castres took advantage of their numerical superiority to run in two quick tries from Vincent Inigo and Steve Malonga that ultimately proved decisive.
The Scots did respond late on through replacement Simon Webster, but the hosts held on for a narrow victory that lifts them into second place in Pool 1.
Edinburgh served immediate notice of their intentions as they went on the attack from the off.
But after a spell of pressure on the Castres line, the hosts broke out from inside their own 22 and secured a penalty following a burst from Romain Cabannes allowing Romain Teulet to slot the first of three penalties.
Teulet landed his second from in front of the sticks on eight minutes and, although Edinburgh responded in kind through the ever-reliable boot of Chris Paterson, more indiscipline from the visitors enabled Teulet to ease his side into a 9-3 lead from long-distance.
While they had the lead, Castres were unable to dominate their opponents and the home crowd became increasingly restless as Edinburgh began to impose themselves.
They finished the first half very much on the front foot and after Paterson had kicked his second penalty, scrum-half Greig Laidlaw ensured they headed in level at the interval with a superbly-struck penalty from inside his own half that crept over via a post.
Edinburgh took their momentum into the opening exchanges of the second half and should have gone ahead on 50 minutes only for Paterson to miss with a penalty.
The home side were also guilty of profligacy as they first turned down a kickable penalty only to fluff the subsequent line-out move and then missed with their next attempt at goal as Pierre Bernard - on as replacement full-back for injured Teulet - put his effort wide.
But the contest turned soon afterwards, a mistake from Edinburgh skipper Roddy Grant putting his team under pressure deep in their own territory.
Although they initially survived, McKenzie was shown yellow card for attempting to kill the ball and the pressure on their line quickly told as Tekori broke from the back of a scrum before offloading to Inigo who burst over in the corner.
Bernard missed the conversion but the lead was extended moments later with a superb counter-attack try from deep that climaxed with Tekori slipping to Malonga to touch down - Bernard this time adding the extras.
Edinburgh refused to lie down and battled to the end with replacement Webster - returning following a long injury lay-off - offering them hope as he surged on to Laidlaw's popped pass to crash over from close range.
Tries: Inigo, Malonga
Pens: Teulet 3
Pens: Paterson 2, Laidlaw
Castres: 15 Romain Teulet, 14 Vincent Inigo, 13 Romain Cabannes, 12 Joseph Tatupu, 11 Marc Andreu, 10 Cameron McIntyre, 9 Alexandre Albouy, 8 Joe Tekori, 7 Chris Masoe, 6 Steve Malonga, 5 Kirill Kulemin, 4 Scott Murray, 3 Luc Ducalcon, 2 Benjamin Kayser, 1 Carl Hoeft,
Replacements:16 Mathieu Bonello, 17 MichaŽl Coetzee, 18 Daniel Saayman, 19 Rodrigo Capo Ortega, 20 Ibrahim Diarra, 21 Thomas Sanchou, 22 Pierre-Manuel Garcia, 23 Pierre Bernard,
Edinburgh: 15 Chris Paterson, 14 Jim Thompson, 13 Ben Cairns, 12 John Houston, 11 Lee Jones, 10 David Blair, 9 Greig Laidlaw, 8 Roddy Grant (c), 7 Ross Rennie, 6 Scott Newlands, 5 Steven Turnbull, 4 Fraser McKenzie, 3 Geoff Cross, 2 Ross Ford, 1 Allan Jacobsen.
Replacements: 16 Andrew Kelly, 17 Kyle Traynor, 18 David Young, 19 Esteban Lozada, 20 Alan MacDonald, 21 James King, 22 Alex Grove, 23 Simon Wesbter.
Venue: Stade Pierre Antoine, Castres
Referee: JP Doyle (England)
Assistant referees: Rob Debney (England), Paul Dix (England)