Ulster, who had crushed Castres 41-17 in their opening Pool Four match in Belfast last weekend had led 6-3 at half-time thanks to two penalties from Paddy Jackson.
Back row forward Chris Henry extended their lead with their only try of the game after 68 minutes with Jackson adding the extras for 13-6.
Jackson added two more penalties to give 1999 champions Ulster a cushion which made Glasgow's last minute try from Fijian replacement scrumhalf Nikola Matawalu a mere consolation.
Northampton, the 2000 European champions, had clawed back a 15-point deficit to emerge 24-15 victors over Glasgow last week, but were outclassed by a Castres team eager to bounce back from their disastrous trip to Northern Ireland.
Castres took just six minutes to open their account when centre Paul Bonnefond crossed and Romain Teulet added the conversion.
Seven minutes later, Northampton were penalised for offside and Teulet slotted over the penalty for a 10-0 lead.
Steve Myler was on target with two quick penalties as Saints cut the deficit to 10-6.
But seven minutes from the break, lock Courtney Lawes was penalised for not rolling away and South African scrum-half Rory Kockott made the Englishman pay with a penalty that gave Castres a 13-6 lead at the break.
Five minutes after the interval, a scrum was reset five metres out from Northampton's line.
The ball came out to Antonie Claassen and the South African back-rower charged over for an 18-6 lead for the French side although Kockott went wide with the conversion.
On the hour mark, Samoan centre George Pisi, who was man of the match against Glasgow, brought Northampton back into the game.
He chased down a Ryan Lamb kick ahead, Kockott fumbled the ball which allowed Pisi to regather before scoring under the posts.
Myler converted for 18-13 before a cool-headed drop goal from Teulet settled Castres' nerves at 21-13.
Another Myler penalty 10 minutes from time came too late for Northampton.
All Friday's scores and scorers!
Glasgow Warriors 8-19 Ulster
The scorers:
For Glasgow Warriors:
Try: Matawalu
Pen: Horne
For Ulster
Try: Henry
Con: Jackson
Pens: Jackson 4
Teams:
Glasgow Warriors: 15 Stuart Hogg, 14 Byron McGuigan, 13 Peter Murchie, 12 Peter Horne, 11 Alex Dunbar, 10 Ruaridh Jackson, 9 Henry Pyrgos, 8 Ryan Wilson, 7 Chris Fusaro, 6 Josh Strauss, 5 Alastair Kellock (captain), 4 Tom Ryder, 3 Michael Cusack, 2 Dougie Hall, 1 Ryan Grant.
Replacements: 16 Finlay Gillies, 17 Ofa Fainga'anuku, 18 Gordon Reid, 19 Tim Swinson, 20 Rob Harley, 21 John Barclay, 22 Scott Wight, 23 Nikola Matawal.
Ulster: 15 Jared Payne, 14 Tommy Bowe, 13 Darren Cave, 12 Paddy Wallace, 11 Andrew Trimble, 10 Paddy Jackson, 9 Ruan Pienaar, 8 Nick Williams Nanai, 7 Chris Henry, 6 Iain Henderson, 5 Dan Tuohy, 4 Johann Muller (captain), 3 John Afoa, 2 Rory Best, 1 Tom Court.
Replacements: 16 Rob Herring, 17 Callum Black, 18 Adam Macklin, 19 Lewis Stevenson, 20 Mike McComish, 21 Paul Marshall, 22 Luke Marshall, 23 Craig Gilroy.
Referee: Mathieu Raynal (France)
Assistant referees: Christophe Berdos (France), Jean-Luc Rebollal (France)
TMO: Vincent Azoulay (France)
Castres 21-16 Northampton Saints
The scorers:
For Castres:
Tries: Bonnefond, Claassen
Con: Teulet
Pens: Teulet, Kockett
DG: Tales
For Northampton Saints:
Try: Pisi
Con: Myler
Pens: Myler 3
Yellow card: Brian Mujati (Northampton Saints, 44 - professional foul)
Teams:
Castres: 15 Romain Teulet, 14 Romain Martial, 13 Paul Bonnefond, 12 Seremaia Bai, 11 Marcel Garvey, 10 Remi Tales, 9 Rory Kockott, 8 Antonie Claassen, 7 Piula Faasalele, 6 Jannie Bornman, 5 Christophe Samson, 4 Joe Tekori, 3 Anton Peikrishvili (captain), 2 Brice Mach, 1 Hai Lazar.
Replacements: 16 Marc-Antoine Rallier, 17 Yannick Forestier, 18 Michael Coetzee, 19 Matthias Rolland, 20 Daniel Kirkpatrick, 21 Pedrie Wannenburg, 22 Romain Cabannes, 23 Marc Andreu.
Northampton Saints: 15 Stephen Myler, 14 Ken Pisi, 13 George Pisi, 12 Dominic Waldouck, 11 Vasily Artemyev, 10 Ryan Lamb, 9 Lee Dickson, 8 Rhys Oakley, 7 Tom Wood, 6 Phil Dowson, 5 Courtney Lawes, 4 Samu Manoa, 3 Brian Mujati, 2 Dylan Hartley (captain), 1 Soane Tonga'uiha.
Replacements: 16 Mike Haywood, 17 Alex Waller, 18 Paul Doran-Jones, 19 Mark Sorenson, 20 Gerrit-Jan van Velze, 21 Martin Roberts, 22 Tom May, 23 Scott Armstrong.
Referee: Alain Rolland (Ireland)
Assistant referees: Olly Hodges (Ireland), David Connolly (Ireland)
TMO: Jude Quinn (Ireland)
Rugby 365