Huddersfield overcame a 16-0 half-time deficit to down Super League's new boys in a hard fought pre-season clash.
With half-back Luke Robinson pulling the strings, they ran the Tigers ragged to score six second-half tries, including four in 11 minutes.
Full back Chris Thorman barged over to spark the comeback and quick-fire tries from winger Rod Jensen, centre Paul Whatuira and loose forward Stephen Wild put the visitors ahead for the first time. Castleford rallied but conceded further touch-downs to substitute George Gatis and another from winger Jensen.
Castleford scored three first-half tries. Winger Michael Wainwright, intercepted to race in from 60 metres and Australian centre Ryan McGoldrick scored a brace, his second six minutes before the break after great work from home debutant Scott Moore and Australian Brent Sherwin.