The forward struck twice in the first half and once in the second as his team brushed aside their SPFL League One opponents with ease.
And his goals have given the Ibrox club the chance of playing their Old Firm rivals Celtic for the first time in two years.
Ally McCoist's side will go into the quarter-final draw after the Dundee United game with St Mirren at Tannadice tomorrow afternoon.
Many Gers fans will be hoping that Celtic overcome Aberdeen at Parkhead this afternoon and join them in the last eight.
For, on the evidence of a one-sided 90 minutes, they would give their age-old city adversaries a good game if they had to square up again.
Only 19,396 fans turned up for the fifth-round tie at Ibrox last night as the game was not included on season tickets. But those Rangers supporters who did brave the elements were treated to an entertaining and greatly satisfying evening.
McCoist had kept faith with the same starting line-up that took to the field against Brechin City in the league at Ibrox last Saturday and his faith was rewarded.
Shiels gave the supporters a taste of what was to come in just the second minute of the match when he collected a Lee Wallace throw-in and unleashed a volley at the visitors' goal.
His effort went straight at Ryan Scully and was easily gathered. However, the Northern Ireland internationalist did better than that not long afterwards.
In the eighth minute David Templeton back-heeled the ball towards the opposition goal. It ended up at the feet of Ryan Williamson and he should have cleared it to safety.
However, he was not alert enough. Shiels nipped in and dispossessed him before turning and curling a shot beyond the cruelly exposed Scully and into the net.
Templeton nearly got his name on the scoresheet himself in the 19th minute. His powerful run culminated with a shot at goal that the keeper did well to hold.
Fraser Aird was responsible for setting up his team's second goal in the 24th minute. He whipped a cross into the opposition box with the outside of his right foot.
Jon Daly rose and met that only to see his header brilliantly denied by Scully. Shiels, though, pounced on the rebound and stroked the ball home from close range.
Templeton, too, is another player who has been enjoying a resurgence in form of late and he effectively killed the tie off with a fine individual goal in the 37th minute.
He picked the ball up on the edge of the centre circle, ghosted past Shaun Byrne, charged at Ross Millen and then drilled a left-foot shot into the bottom right corner.
The last time these teams clashed at Ibrox - in the league back at the start of November - it was an X-rated encounter. No fewer than three Rangers players - Ricky Foster, Andy Little and Lee McCulloch - ended up in hospital as a result of injuries sustained in the 3-1 win.
AND Foster and Little spent lengthy spells out of action with a broken foot and a broken jaw respectively due to the physical approach of their Fife rivals.
But Jim Jefferies' young side was swept aside ruthlessly on this occasion. Cammy Bell had one save to make in the opening 45 minutes and he did so with ease.
Jefferies was clearly unhappy with his charges' display and threw on Ryan Thomson for Millen and Faissal El Bakhtaoui for Byrne at the start of the second half.
However, the Pars manager's substitutions had little or no immediate effect on the game as the home team forged even further in front in just the 47th minute.
Templeton unleashed Wallace down the left flank and the full-back powered into the opposition area. Scully charged quickly off his line to deal with the danger.
The keeper diverted the ball straight to the feet of that man Shiels, who threaded a low shot through the Dunfermline defenders and into goal to complete his hat-trick. It was the 29-year-old player's sixth goal in five games.
Considering he had hardly been involved in the first team before that it is a remarkable personal haul.
ARNOLD PERALTA came on as a replacement for Aird - the teenage winger who looks as if he has played one game too many - in the 72nd minute of the match.
Shiels, a player who has been through so much with injury this season, came off to a standing ovation in the 76th minute and his countryman Little came on.
Robbie Crawford was given a run-out by his manager in the last 10 minutes of the match. Nicky Law, who had dominated proceedings in central midfield, made way.
Rangers centre-half Bilel Mohsni and Templeton were both booked by referee Bobby Madden for stupid challenges with just a few minutes of the match remaining.
Rangers are now 23 points clear in SPFL League One and certain to secure that title.
In addtion, they will compete in the final of the Ramsdens Cup against Raith Rovers in April. Could they complete an unprecedented domestic treble by going all the way in the William Hill Scottish Cup as well?