The Northern Irishman slotted home from close range inside the first 10 minutes before benefiting from two empty nets either side of David Templeton's third for the hosts as Ally McCoist's side cruised to a four-goal lead in just 47 minutes.
Former Bolton boss Owen Coyle said ahead of the match Rangers would not be in his top five picks to lift the trophy come May.
But Ally McCoist's men shrugged off their patchy start to 2014 to put in a much-improved display as they served up a warning ahead of Sunday's quarter-final draw.
They will rightly fear a tie with their old rivals Celtic but if they can replicate this type of form in the next round, the League One leaders will believe they can handle anything else the Scottish Premiership has to offer.
Shiels was tipped to depart Ibrox during the January transfer window but made it six goals in his last five games to reiterate his return to form.
And Templeton gave further evidence of his return to fitness as he darted the length of the Dunfermline half before scoring his seventh of the campaign as Rangers swept the hapless Fifers aside.
The teams' last meeting just before New Year ended in a comprehensive 4-0 win for the Glasgow giants at East End Park.
But since then Rangers had been anything but convincing despite racking up another six straight wins.
The League One leaders were booed off against Brechin last week after another nervy display and there were more jitters to overcome in the early stages against the Pars as Lawrence Shankland clattered into keeper Cammy Bell as they both went after Ross Millen's cross.
But in front of a half-empty Ibrox, there was no need for panic once Shiels handed his side an eighth-minute lead.
Templeton drove into the box before attempting to back-heel into the path of the overlapping Lee Wallace. The ball broke off Williamson's feet, though, and before the midfielder could clear Shiels pounced to roll home from six yards.
The former Hibernian and Kilmarnock forward broke through on Scully moments later looking for a second but the keeper was out smartly to block at his feet.
Templeton was then denied after bursting in from the left to shoot at Scully but Rangers only had to wait until the 24th minute to double their lead.
Nicky Law's free-kick from wide on the right was met by Jon Daly's head but while Scully was down in time to parry the Irishman's effort he could do nothing as Shiels gobbled up the rebound.
Sheils and Black had decent attempts at a third goal unrewarded before Templeton went on another run from just inside his own half, outstripping Millen with ease as he then planted a left-foot shot past the flat-footed Scully for the third on 38 minutes.
Pars striker Ryan Wallace earned himself a booking after crashing into Templeton just before the break, while Bilel Mohsni came close when he headed wide from the Ian Black free-kick that followed.
Jim Jefferies responded to his side's shambolic display by hooking Ross Millen and Shaun Byrne at half-time, replacing them with Ryan Thomson and Faissal El Bakhtaoui - but it made little difference as Shiels wrapped up his treble within two minutes of the restart.
Lee Wallace was put in behind the Dunfermline defence by Templeton but as Scully rushed to block at his feet, Shiels was again well-paced to roll the loose ball into the empty net.
Fraser Aird and Black worked a quick free-kick before the former Hearts battler skimmed the crossbar with a decent strike on 68 minutes.
The pace of the game dropped in the closing stages but Black nearly spiced things up with a 25-yarder that cannoned off Scully's bar while the keeper was alert to deny Templeton from a tight angle in the final 10 minutes.