Doherty scored at the start and the end of the first half, but in between the League One side took a shock lead through goals from James Bolton and Josh Laurent, with John Ruddy letting the latter's shot slip through his hands.
Ivan Cavaleiro put Wolves back in front with a classy finish in the second half and despite some late pressure from the visitors it proved to be the winner.
Wolves have beaten Chelsea and Spurs this season, they've been the better team at Old Trafford and the Emirates and brushed aside West Ham and Everton.
But few have troubled them as much as Shrewsbury Town, writes Tim Spiers at Molineux.
Nuno Espirito Santo's team needed an injury-time minute equaliser from Matt Doherty to make it 2-2 in the first tie...here they needed an injury-time goal from the same player to make it 2-2 at the break.
Indeed, with three goals and one assist over the two games, Wolves have a lot to thank the indomitable Irishman for.
Ahead of the tie Nuno called for total focus from his players – in the first half he certainly didn't get it, with Wolves conceding two sloppy goals on a night John Ruddy will want to forget for allowing one to slip through his fingers.
Wolves' fringe players did their first-team prospects little good. Adama Traore frightened the life out the Shrewsbury defenders at times but he, Helder Costa and Ivan Cavaleiro didn't look like Premier League players against League One defenders, for the most part. Cavaleiro did make some amends with a fabulous finish for the winner.
To that end you wonder how strong Nuno will go in the fifth round against a resurgent and promotion-chasing Bristol City.
Wolves are two wins from reaching only a second semi-final in this competition since 1981 – if he and Wolves seriously want to win this competition, can he leave anything to chance? We'll find out a week on Sunday, but the sell-out Molineux crowd who've got Cup fever will only give you one answer.
His team were below par here, but hey, this is FA Cup football, the game of Shrewsbury's live...and Wolves got through.
In the FA Cup, that's all that matters. The dream lives on.
As for the first tie, Nuno made six changes to his XI.
He kept the same back three and wing-backs, but changed the goalkeeper, the midfield, the forwards and also the formation, switching to 3-4-3 with John Ruddy, Romain Saiss, Morgan Gibbs-White, Adama Traore, Ivan Cavaleiro and Helder Costa coming in.
Shrewsbury made a number of signings before the transfer deadline who were ineligible to play (including ex-Wolves man Scott Golbourne) as they joined after first tie. Mat Sadler and Anthony Grant also missed out through suspension, but former Wolves stalwart Dave Edwards was fit enough for a place on the bench.
Wolves came into the game on the back of two wholly convincing and impressive victories over West Ham and Everton – and despite the changes to the XI that confidence was apparent when they took the lead inside just 80 seconds.
It was pretty regulation stuff – Morgan-Gibbs-White's corner wasn't cleared, it dropped at Doherty's feet and he finished into the corner to net his second goal in the last five minutes of the tie, stretching back to 10 days ago.
In theory Shrewsbury's game plan was out the window. But within nine minutes they were level when a Greg Docherty corner was met by James Bolton in the heart of the six-yard box and he headed home. Yet again it was static and poor defending – a theme of the half for both sides.
Wolves actually showed a big improvement in the coming minutes. Traore revved up his engine and took on defenders at will, rousing the sizeable home crowd.
One such run to the byline saw a right-wing cross met by Jonny Castro Otto on the volley at the back stick – his shot was bottom-corner-bound but was crucially blocked.
Traore was the go-to man but, that aside, his end product was poor, as was the case for Costa and Cavaleiro, too.
That meant for all Wolves' 72 per cent possession, they created few chances. Willy Boly should have made it 2-1 when he sent a diving header wide from a corner and then, from another set piece (and Gibbs-White's deliveries were impressive) Saiss couldn't quite turn the ball home.
Corners were Wolves' biggest threat. From open play they were lucklustre, with little in the way of creativity or incisiveness coming from midfield.
Shrewsbury duly grew in confidence and looked to hit Wolves on the break. They got decent numbers forward but the usual back trio of Ryan Bennett, Conor Coady and Willy Boly were still fairy comfortable.
Then came a moment which took Molineux's breath away – but not in a good way. Josh Laurent tried his luck from 20 yards, a tepid and fairly harmless shot, but the wet ball slipped through Ruddy's hands and bounced apologetically over the line. It was a shocking error – and a shock lead for Salop.
All of a sudden we had a fascinating cup tie on our hands – but Wolves' response was woeful. Misplaced passes were commonplace, they couldn't muster a shot and the crowd grew in frustration.
However by half time they were still level. This time Shrewsbury's keeper made an error, with Steve Arnold dropping a cross and Doherty slamming home from close range for his third goal of the tie. The cheer inside Molineux was muted – as was statuesque Nuno's celebration.
Wolves knew they hadn't played well enough and at the start of the second half they set about putting that right.
They controlled possession and dominated play in the Shrewsbury third. However again, corners aside, they carried little threat.
There was no end product from the front three and Salop were comfortably coping with what Wolves were conjuring up.
At a quiet Molineux Wolves needed inspiring. And Ivan Cavaleiro was the man to do it.
Traore and Doherty played their part, with the former winning the ball and the latter playing it towards the Portuguese forward, but this was all about Cavaleiro who showed strength to shrug off his man and then arrogance and sublime skill to roll his foot over the ball, sublimely swaying inside and beating the keeper for his fourth goal of the campaign.
That settled Wolves and the crowd down. Joao Moutinho and Raul Jimenez replaced Costa and Traore as Nuno tweaked the formation and, with 15 minutes to go, the hosts were in charge.
Jimenez almost got on the scoresheet when firing first-time from Doherty's pass. You felt like Wolves would need another goal to secure their passage and Omar Beckles gave them a warning sign when ambling forward to fire inches wide from 20 yards.
The visitors threw everything forward in the closing stages – as Nuno gave a first-team Wolves debut to youngster Niall Ennis – but despite a couple of dangerous set pieces Wolves saw it through with relative ease.
02 - GOOOALLL! Wolves make a perfect start as Doherty puts them in front after just 80 seconds! Shrewsbury fail to clear Gibbs-White's corner, and the ball falls back at the feet of Gibbs-White. His cross finds its way to Doherty, who slots home.
11- Goal! Salop come up with a swift equaliser! Docherty's peach of a corner is powerfully headed into the net by Bolton. Not the best defending from the hosts, with Ruddy caught in no man's land.
39 - Goal! Shrewsbury take a shock lead, due to a horrendous Ruddy mistake! Laurent's tame effort from 25 yards out slips through Ruddy's hands and rolls, almost in slow motion, over the line.
45+5 - GOOOALLL!! Doherty bails Wolves out, levelling the scores just before the break! He capitalises on some shoddy work from Arnold, nodding in after the keeper spills a cross from Otto.
62 - GOOOOAALLLL!!! A piece of brilliance from Cavaleiro sees Wolves regain the advantage! Doherty is the provider, feeding the Portuguese forward who sensationally rolls the ball past his marker with his studs and finishes underneath Arnold.
82 - Almost another Salop leveller! Beckles bursts up from the back and is not closed down, so decides to let fire from 30 yards and his strike sails just past the far post.
Wolves (3-4-3): Ruddy; Bennett, Coady (c), Boly; Doherty, Gibbs-White, Saiss, Otto; Traore (Jimenez, 77), Cavaleiro (Ennis, 88), Costa (Moutinho, 69)
Subs not used: Norris (gk), Dendoncker, Giles, Neves
Goals: Doherty (2, 45+6), Cavaleiro (62)
Shrewsbury (3-4-3): Arnold; Vincelot (Sears, 38), Waterfall, Beckles; Bolton, Norburn (c), Laurent, Haynes; Doherty, Okenabirhie (Amadi-Holloway, 78), Gilliead (Whalley, 66)
Subs not used: Charles-Cook (gk), Ward, Edwards, Rowland
Goals: Bolton (11), Laurent (39)
Referee: Lee Probert (Wiltshire)
Wolves are back in action next Monday when they host Newcastle at Molineux, 8pm kick off.