The hosts opened the scoring with the first try after just eight minutes when Romain Martial intercepted a pass before sprinting 80 metres to touch down.
Stephen Myler got Northampton on the scoreboard with a penalty shortly afterwards, but the Saints were temporarily reduced to 14 men when Ben Foden was sent to the sin bin just past the half-hour mark.
Castres were not able to take full advantage of their extra man, however, only adding three points from a Rory Kockott penalty before half time.
Kockott added another penalty shortly after the restart, but Northampton closed the growing gap to just three points when Dylan Hartley went over for a try that was duly converted by Myler.
Kockott kept the scoreboard ticking over for the hosts with a penalty in the 54th minute, but Myler was unable to do the same four minutes later as he missed a kick that would have reduced the deficit back to just three points.
Myler did make his next kick, but another from Kockott restored the six-point lead, and that is how it finished as Castres held on for a valuable victory.