There are two places available in the last eight for the two best runners-up - but with 20 points normally the minimum requirement to secure one of them, even a four-try bonus point win away to Glasgow may not be enough for the 2011 beaten finalists.
Second row Courtney Lawes put in an eye-catching performance to gladden the watching England coaches and as the game wore on the Saints pack became increasingly dominant in the scrum and around the park.
But in the end too many mistakes and the sheer obduracy of the visitors meant a narrow victory was all Saints could chisel out.
South African scrum-half Kockott landed a penalty to give Castres the lead but Myler knocked over two for Saints as the hosts, initially shaky in the scrum, saw their front row begin to get to grips with their opposite numbers.
Leading 6-3 after half an hour a four-try bonus point victory looked a long way away and Castres were soon level after Dylan Hartley was penalised at a ruck in front of the Northampton posts and Kockott slotted a simple kick.
The visitors had Georgian prop Anton Peikrishvili yellow carded for dragging down a maul shortly before the break but the French side repelled Saints' attempts to drive over from an attacking line-out.
Daniel Kirkpatrick hit the woodwork with a drop-goal for Castres just after the interval but Saints finally exploded into life with a sweeping move that ended with Hartley held up over the line.
From the scrum Phil Dowson was bundled into touch in the corner but Saints stole the Castres line-out and sustained pressure ended with Myler popping over a penalty.
Saints by now were well on top in terms of both territory and possession and they moved into a six-point lead as replacement Lamb kicked a penalty after another Northampton assault.
A brace of penalties apiece from Kockott and Lamb ensured the final margin was six points and left Saints knowing their Heineken Cup hopes are hanging by a thread.
VIEW FROM THE DRESSING ROOM
Northampton director of rugby Jim Mallinder told BBC Radio Northampton:
"We've lost too many games at home and come away disappointed so we'd talked about getting the performance and the win.
"We'd have really liked to have got five points but Castres never gave up and, defensively, they were very good.
"I've got two two or three (times) in my mind where we should've done better close to the try line. But you're against a quality side.
"The possibility is for the second place (to qualify in the Heineken Cup) but you've got to go to Glasgow and win and then we'll see what competition we're in."
Northampton captain Dylan Hartley:
"It shows we have a good character [to still be in the competition]."
"Tonight was a good all-round performance. We wanted to score four tries and take five points but they are a good team and to close out a game as close as that was quite professional.
"Going into next week, we have to get five points to keep hopes alive. We are doing all right away from home. The spirit is good in the camp.
"All we can do is worry about winning and hopefully the tries will come with that."
Sanchou for Cabannes (71), Bonnefond for Lamerat (66), Bernard for Kirkpatrick (73), Marmotion for Taumoepeau (62), Mach for Bonello (52), Rolland for Samson (71), Wannenburg for Classen (65).
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.