This Betfred Championship clash at The Shay was level at 4-4 after 23 minutes, but a collapse, kicked off by Brenden Santi’s yellow card, saw them ship 24 more points before the interval to fall 28-4 behind.
Cougars were much more solid after the break, with Robbie Storey grabbing his second try of the day for the visitors.
But that deficit was always going to be near impossible to overcome, and Lachlan Walmsley’s try with 10 minutes to go wrapped up the win for the hosts.
Keighley sit 10th in the 14-team table at present, with two wins and four defeats in their six games so far.
Ill-discipline from the visitors saw them concede the opening score inside five minutes.
A swinging arm from Luke Gale, on his 350th career appearance, caught James Saltonstall and gifted Halifax a penalty.
They kicked to touch and from the resulting move, Zack McComb found himself in space, before setting up Saltonstall to score in the corner.
Joe Keyes’ conversion attempt from the touchline just missed the target, and Keighley grew into the game thereafter.
They levelled the scores when a fine move saw the ball worked quickly to the right edge.
The prolific Storey made no mistake out wide, tucking the ball under his arm to crash over the line.
Gale’s attempt to add the extras did not have the legs, meaning the scores remained level.
But Cougars were punished when Santi was sent to the sin-bin for a professional foul from behind on Louis Jouffret as he raced towards the try line.
Under pressure with 12 men, Cougars soon conceded to a clever show and go from Keyes.
The former Bulls man converted his own score, and Fax increased their lead on 29 minutes.
The ball was worked left to Ben Kavanagh, who showed good strength to power over the line.
Keyes landed the conversion to put his side 16-4 in front, with the sliding doors moment arriving four minutes before the break.
Cougars looked certain to score on the right and reduce the deficit to single figures.
But Walmsley leapt high to intercept virtually on his own line, racing 90 metres to score for the hosts.
Keyes converted, as he did again on the hooter after Tom Inman scooped the ball up from a ruck and powered over the line.
Cougars needed a good start to the second half, and they got it.
Jake Maizen was sin-binned for Fax almost immediately after taking his man out off the ball, and Storey crashed over a minute or two later.
Gale converted to make the score 28-10, but Keighley struggled to capitalise on their man advantage.
But with 12 minutes to go, and both sides long since back up to their full complement, the visitors were gifted one final chance to make an epic comeback.
Home forward Jacob Fairbank was sent to the bin for a tackle below the knee, with Cougars’ next set coming in a dangerous position.
But Charlie Graham’s teasing grubber rolled dead, and Fax punished that missed opportunity moments later, despite their man disadvantage.
Sadiq Adebiyi’s pass was intercepted by Keyes and he released Walmsley, who had a free run to the line to score.
Keyes’ conversion set the seal on an impressive win for the hosts, who moved up to fifth in the table as a result.
Cougars’ next game is an even bigger West Yorkshire derby, as they host in-form Bradford at Cougar Park next Sunday.