Saints led 4-0 early on but were gradually overpowered as they failed for the first time for 12 years to reach the last four, leaving the Warriors to join last year's runners-up Leeds in the hat for Sunday's semi-final draw.
With little to choose between the teams, Wigan were no doubt grateful for home advantage after finally getting the go-ahead to play the tie at the DW Stadium, where a bumper crowd lapped up a second derby victory of the season following their Super League triumph at Langtree Park on Good Friday.
Saints made the brighter start after being gifted an early attacking position through Anthony Gelling's handling error and James Roby caused havoc in the Wigan defence with his electrifying bursts from dummy half.
The early pressure paid off when centre Michael Shenton was the first to Jonny Lomax's kick and he fed the ball back for full-back Paul Wellens to touch down for the game's first try after five minutes.
Lomax surprisingly missed the conversion and Wigan drew level seven minutes later when Sean O'Loughlin and Brett Finch worked the ball out wide for full-back Sam Tomkins to scythe through the Saints defence, with Josh Charnley adding the goal.
Wigan added a second try midway through the first half when a superb offload by centre George Carmont enabled O'Loughlin to go through a gap to touch down, but they lost prop Epalahame Lauaki five minutes before half-time when he was knocked out in a tackle from Saints' former Wigan forward Mark Flanagan.
The tie became scrappy as the error count rose and it remained in the balance until stand-off Finch found a hole in the Saints defensive line nine minutes into the second half and evaded last man Wellens to touch down.
The holders could have made sure of victory had Hughes's final pass found an unmarked Charnley but his finishing again let him down and the Warriors were forced to demonstrate their defensive mettle as St Helens mounted a sterling fightback.
The home side had a let-off when Saints centre Gary Wheeler lost the ball going for the line and that represented the visitors' last chance to get back into the tie. Charnley's 67th-minute penalty from 40 metres out put his side two scores in front and finally ended the game as a contest.