The Tigers moved four points clear of neighbours Wakefield Trinity with just two games remaining after outscoring the Black and Whites by five tries to two.
Jason Qareqare scored a superb brace and Greg Eden also touched down in the opening period before second-half scores from Alex Foster and Jordan Turner confirmed the win.
Head coach Ward said: “It’s a pretty good feeling. We knew going into it that it was a big game after last week (losing at Warrington Wolves).
“This was our last home game and to get the win is a great feeling.
“We didn’t want to drop as much ball as we did, but there were some big defensive efforts out there for us tonight.
“It was scrappy and we made it a little bit tense towards the end, but in the scale of things it’s alright.
“It’s still not job yet done, although it’s another step closer. The young fellas were very good.
“Jason came up with a couple of big plays, Muizz Mustapha was sensational in the pack and probably our best middle.
“He added loads and it was the same for Cain Robb when he came on. Maybe we should have trusted the young fellas a bit earlier.”
Wakefield’s 18-10 home defeat to Catalans Dragons, coupled with Castleford’s victory, has left survival within touching distance for the Tigers.
Ward said: “Someone told me about the Wakefield result at the back end of the game, but we can’t keep worrying about Wakefield’s results.
“As I said, it’s not done yet because there are still four points to play for.”
Ward revealed influential back-rower Joe Westerman had been taken to hospital with a hand injury.
The Tigers boss said: “It was a big loss for us when he went off.
“Joe was having a fantastic game and we had to shuffle people around. Hopefully we will get an answer on the injury tonight.”
Hull coach Tony Smith admitted his side’s display was too error-ridden as Castleford showed greater desperation to clinch the points.
Smith, whose side scored through Adam Swift’s brace, said: “It was messy from us – too many mistakes were costly and from the outset I thought we just had a lack of composure.
“We probably didn’t start the match in the right manner and looked a bit panicky.
“Errors cost us and in some games they cost you more. They were costly errors from us and I thought they were a little bit more desperate at times.
“Cas made errors too, but that’s the best they have defended their try-line for some time.
“They were fighting for their lives and deserved their win. Cas had that desperation because they know they’re in it for survival at the moment.”