Harlequins (13) 23
Tries: James 2
Cons: Staunton 2
Pens: Staunton 3
Castres (9) 23
Pens: Dourthe 6
Harlequins ended their eight-match losing streak but lost the chance of a vital home win against Castres.
Wales international Dafydd James scored two tries as the hosts twice opened a lead, Jeremy Staunton adding 13 points.
But Castres hit back with a try from Brad Fleming and six penalties from man-of-the-match Richard Dourthe.
Quins led 13-9 at the break but the scores were level after an hour and two missed penalties from Staunton in the closing stages left them deadlocked.
Harlequins will now take their search for a first victory of the season to Wasps next weekend.
When they led 13-3 midway through the first half it appeared they would break their season's duck.
Tom Williams, a slippery full-back making his first start of the season, slid around Dourthe to launch a
fluid break and when he moved the ball inside via Simon Keogh to Andre Vos, the Harlequins skipper fed James to finish.
Two Staunton penalties opened a 13-3 advantage, the second of which came after Harlequins' much-maligned pack had driven nearly 30 metres from the lineout and forced Castres to collapse the maul in front of the posts.
Former Wasps flanker Paul Volley turned in a gritty display at number eight for the visitors but it was Dourthe who proved Castres' key man.
Dourthe put the boot into Quins
After landing a 48-metre penalty to get his side on the board and receiving a dressing down from the referee for a high blow on Ceri Jones, he landed two quick penalties before the interval.
Staunton landed another penalty on the resumption but every time Quins thought the game was theirs, Dourthe pinned them back.
He landed two more penalties to draw Castres within a point before James
finished off a neat move for his second try to extend Quins' lead to 23-15.
But with Quins' celebrations still in full flow, Dourthe picked a wonderful angle and broke the home side's cover defence before handing outside to Fleming.
Dourthe missed the conversion from wide on the right but landed a sixth penalty of the afternoon just before the hour to level the scores.
Castres were then reduced to 14 men when Volley was sin-binned, but Staunton was unable to dispense punishment.
Harlequins: T Williams; G Harder, W Greenwood, D James, S Keogh; J Staunton, S So'oialo; M Worsley, T Fuga, C Jones, R Winters, S Miall, N Easter, A Vos (capt), T Diprose.
Replacements: A Tiatia, M Lambert, O Palepoi, L Sherriff, A Dunne, M Deane, G Duffy.
Castres: U Mola; B Fleming, R Dourthe, M Denney, B Lhande; Y Delaigue, A Albouy; J Fitzpatrick, M Ledesma (capt), A Galasso, F Capo Ortega, N Spanghero, R Froment, A Bias, P Volley.
Replacements: G Argenese, M Reggiardo, D Barrier, G Bernad, D Bory, X Sadourny, N Morlaes