Castleford finally avenged the defeat that saw them relegated two years ago as they put another dent in Wakefield's engage Super League play-off hopes.
The Tigers trailed to two early tries at Belle Vue but powered back to win convincingly and end a run of nine straight losses to their derby rivals.
Stuart Donlan and Joe Westerman scored two tries apiece to condemn Wakefield to a seventh successive loss in all competitions.
Kirk Dixon converted all eight of the Tigers' tries in a superb performance.
It was only Castleford's sixth win of the season and their first over the Wildcats since the loss that condemned them to the National League on the final day of the 2006 season.
Sean Gleeson and Sam Obst had got John Kear's side off to a good start with tries in the opening 14 minutes.
Yet the Tigers responded with four tries before the break to take a 24-12 lead.
Donlan scored the first two as he benefited from passes from Brent Sherwin and Ned Catic.
Westerman then touched down Ryan McGoldrick's kick and Luke Dorn went over from a Ned Catic pass.
The dominance continued after the restart as Andy Henderson went over from dummy half and Peter Lupton sent Craig Huby through,
Ryan Atkins pulled one back for Wakefield and Brett Ferres added another consolation late on but Castleford finished the game in style.
Westerman claimed his second from a Dorn kick and Scott Moore finished off a good move with his side's eighth try.