Northampton climbed to third in the Premiership - but missed out on a bonus point win - as they stretched Bath's losing run to four games.
Olly Barkley kicked the visitors ahead but Saints made Bath suffer with tries from Phil Dowson and Tom Wood.
Ryan Lamb converted Jamie Elliott's score and added a first-half penalty as the visitors crumbled.
Francois Louw's try and Barkley's boot put Bath back in contention but despite pushing Saints could not find a fourth.
Bath showed early attacking intent in the opening minutes but that gave way to an awful first-half performance characterised by poor kicking out of hand, questionable defending and a creaking line-out.
Barkley gave them the early lead from the tee on 13 minutes when he landed a 44-metre kick from wide on the right.
But Northampton countered through Dowson, on his return from suspension, as he rounded off a sweeping move that put Saints in front, but Lamb could not convert.
George Pisi made the second when he gathered Lamb's chip over and offloaded to Wood who scampered under the posts to make the conversion a formality.
The quickfire tries gave the hosts confidence and as they added tempo Bath started to fall apart.
Elliott crossed on the half-hour as huge holes appeared in Bath's defence but his score was ruled out for a knock on in the build-up.
Pisi's kick through and tackle on Nick Abendanon earned Saints a penalty 10 metres out and a yellow card for the Bath full-back which Lamb landed to make it 15-3 on 31 minutes.
With Abendanon gone Lamb chipped ahead again and after Downey regathered, Dickson flung a wild pass out wide which Elliott juggled over the line but managed to ground.
Lamb added the conversion from the touchline and Saints pushed for a pre-interval bonus point but spurned two good chances.
Barkley landed an early penalty after the break but soon after Wood was held on the line illegally and Stephen Donald was sent to the sin-bin.
The hosts should have capitalised but the concentration and accuracy that defined their first-half showing had deserted them when once again Elliott went over but Lamb's pass was deemed forward.
Saints took Soane Tonga'uiha and Courtney Lawes off but replacement Samu Manoa was soon sin-binned for taking a man out at the line-out and a minute later James Downey saw yellow for off-side at the ruck under the posts.
With the hosts two men down Louw finished off the resulting driving maul to make it, with the conversion, 22-13 with 17 minutes to play.
Lamb missed a 34-metre penalty but almost fashioned a try for Pisi when he dinked the ball over but his centre could not quite gather the ball.
Saints produced two fabulous driving mauls while they were still two men down but they were just denied by Bath who fought doggedly throughout the second half.
Northampton Saints director of rugby Jim Mallinder told BBC Radio Northampton:
"You've got to first of all get your win - that's the important thing. We had a fantastic first half but the second half was a little bit disappointing.
"When you go down to 13 men, you put pressure on yourselves. We conceded a try from a scrum, but then we got up in their half and played really well.
"We are learning lessons, but if we want to be a really top team, we need to improve in that second half and put teams away."
Northampton: Foden, Artemyev, Pisi, Downey, Elliott, Lamb, Dickson, Tonga'uiha, Hartley, Doran-Jones, Lawes, Sorenson, Dowson, Wood, Wilson.
Replacements: Myler for Lamb (74), A. Waller for Tonga'uiha (60), Haywood for Hartley (74), Mercey for Doran-Jones (54), Manoa for Lawes (60).
Sin Bin: Manoa (61), Downey (63).
Bath: Abendanon, Cuthbert, Williams, Barkley, Banahan, Donald, Claassens, Flatman, Batty, Wilson, Attwood, Caldwell, Beattie, Mercer, Louw.
Replacements: Scott for Williams (51), Heathcote for Barkley (68), Catt for Flatman (41), Ovens for Beattie (72).
Sin Bin: Abendanon (31), Donald (46).
Ref: David Rose (RFU).