Dreadful defending by the Giants handed Castleford's Waine Price two tries which could prove vital in the Tigers' bid to stay in Super League.
Huddersfield (0) 12:
Tries: White, Evans
Goals: Costin (2)
Castleford (14) 29:
Tries: Pryce, Hudson, Tookey
Goals: Godwin (6)
He scored twice in the first 10 minutes and three goals by Wayne Godwin saw Cas comfortably ahead 14-0 at the break.
Huddersfield had a first-half try ruled out but Paul White's try after the break gave them hope.
James Evans also went over before Ryan Hudson and substitute Mark Tookey scored to secure Castleford's victory.
Nathan Sykes was allowed to charge through the home defence before flicking a reverse pass to Price to go over for the first try after 90 seconds.
He added his second when Stanley Gene's misplaced pass allowed him to break clear down the right and score.
Castleford made light of their struggles this season with a fine display of adventurous rugby, but the home side thought they were back in it when O'Hare went over, only to see the score ruled out for a forward pass.
White scored under the posts just after the restart, and when Brandon Costin set up James Evans for their second score, Huddersfield thought their luck might be about to change.
But they were wrong, as two more Tigers tries, two Wayne Godwin penalties and a Francis Maloney drop goal saw them do the double over their West Yorkshire rivals.
Tigers coach Gary Mercer said afterwards that his players have turned the corner and will continue to fight for the rest of the season.
"When you go on a long losing run as we did it takes time to get the confidence back, but we are getting there," Mercer said.
"The lads are finally starting to do justice to themselves and the club and I'm sure if we keep playing like that we will win more than we lose from our remaining games."
Huddersfield coach Jon Sharp took little comfort from his team's fifth straight defeat.
"There was only one desperate and enthusiastic side out there and it was not us," he admitted.
"Castleford totally out-performed us and self-destructing at crucial stages early in the game made it worse.
"The terrible start we made put us under a lot of pressure and to be honest, we simply looked nervous more than anything else."
Huddersfield: Donlan, O'Hare, Evans, Bailey, St Hilaire, Costin, March, Gannon, Penkywicz, Roarty, Nero, Jones, Gene
Castleford: Gibson, Pryce, Saxton, Rogers, Mellor, Davis, Maloney, Sykes, Godwin, Lynch, Harland, Crouch, Hudson.