Hull made the quicker start of the two teams, with Ben Crooks adding an early try for the visitors.
Aaron Heremaia added to the score for the Black and Whites, before Crooks claimed his second just before half time, giving Hull a 10-point cushion at the break.
Rangi Chase inspired a dominant spell from the hosts at the start of the second half, crossing the whitewash early on to get the Tigers back into the game, before setting up Daryl Clark for a try to give Castleford the lead for the first time in the game.
Heremaia and Crooks both added further tries to level the scores, before an effort from James Clare put the hosts back in front with just over 10 minutes to play.
Crooks added his fourth try of the game late on to give Hull a chance to get back on level terms, but the conversion was missed.
The 20-year-old almost added his fifth in the 80th minute as Hull pushed to snatch the win, but Clare was able to hold him up just before the try line.