Wigan (12) 18
Tries: Hansen, Carmont, Roberts Goals: Richards (3)
Castleford (0) 12
Tries: Huby, Westerman Goals: Westerman (2)
Noble's side now face Hull KR in the next round
Wigan survived a late fightback from Castleford to book their place in the Super League preliminary semi-finals, where they will face Hull KR.
Brian Noble's side led 12-0 at the break following first-half tries from Harrison Hansen and George Carmont, both of which Pat Richards converted.
And Amas Roberts's try seemed to have given Wigan an unassailable 18-0 lead.
Castleford responded with converted tries from Craig Huby and Joe Westerman but Wigan held on despite a late scare.
Wigan will now travel to Craven Park on 26 September to face Hull KR as they look to make this year's Grand Final.
In a scrappy, bad tempered, error-ridden affair, Wigan made the better start.
Warriors second rower Hansen was held up on his back over the line in the early stages.
Castleford's best chance of the first half fell to full-back Richard Owen, whose jinking run to the line was halted by a tremendous last-ditch tackle from Wigan centre Carmont.
The deadlock was finally broken on 21 minutes and it was appropriate that the try came from a handling error, Hansen pouncing on a loose ball after Tigers winger Kirk Dixon failed to deal with Thomas Leuluai's towering kick to the corner.
The Warriors extended their lead in similar fashion 10 minutes later, Richards cleanly collecting Leuluai's kick to get Carmont over, and Richards kicked his second conversion to make it 12-0.
Young stand-off Sam Tomkins created an overlap for full-back Cameron Phelps to get winger Roberts over for Wigan's third try on 51 minutes and it appeared the game was up.
But on the hour prop Huby brushed aside the challenge of Phelps to claim a try and his side's first points of the game.
Westerman converted and then went over in the corner himself to reduce the deficit to 18-12.
And in the dying minutes of the game Castleford created an overlap but the bounce of the ball was unkind and it trickled into touch rather than into the path of the advancing attack.
Wigan coach Brian Noble:
"I thought we dominated the game for 60 or 65 minutes and came up with couple of errors that let Castleford back in the game.
"I thought we defended really well, it was a couple of individual errors that let Castleford back in.
"Our issue is with the ball, we need to look after the ball a bit better but there were some really good efforts tonight.
"I thought Cameron Phelps was magnificent and Pat Richards was very good."
Castleford coach Terry Matterson:
"The players are gutted in there because it is a real missed opportunity.
"We felt we had a real chance of going further. It was our worst attacking performance of the season, our skills were really poor.
"Defensively I thought we were outstanding - they scored two tries off kicks - but, if you don't respect possession in these games, it's very difficult.
"But you've got to give credit to Wigan, they defended well."
Wigan: Phelps, Roberts, Gleeson, Carmont, Richards, S. Tomkins, Leuluai, Coley, McIlorum, Prescott, J. Tomkins, Hansen, O'Loughlin.
Replacements: Fielden for Coley (20), Riddell for McIlorum (20), Paleaaesina for Prescott (20), Flanagan for J. Tomkins (51).
Castleford: Owen, Dixon, Shenton, Evans, Wainwright, McGoldrick, Sherwin, Sargent, Chase, Huby, Ferres, Clayton, Jones.
Replacements: Higgins for Sargent (16), Netherton for Chase (29), Feather for Huby (26), Westerman for Jones (19).
Ref: I Smith (Oldham).