Boyd headed Rangers into the lead after seven minutes but a mistake from goalkeeper Steve Simonsen allowed Tony Quinn to level in the 31st minute.
However, Boyd nodded home from close range just after the break to earn Rangers a 2-1 victory at Airdrie's Excelsior Stadium and set up a clash with Inverness.
Rangers manager Ally McCoist named a strong team with just one change from the side that beat Dumbarton on Saturday, Arnold Peralta in for David Templeton on the right flank.
There was no sign of the struggle to come for Rangers in the opening stages of the first-round tie, which had been delayed by the Commonwealth Games, and only a wonderful save from William Muir prevented Lee McCulloch heading home Nicky Clark's cross.
The opener soon came when Boyd headed into the roof of the net from six yards following a pinpoint right-wing cross from Nicky Law.
Rangers opened Queens up on the break moments later and Lewis Macleod headed in Peralta's cross but the goal was disallowed for offside.
Boyd had a shot saved from 20 yards as Rangers probed for a second but they had lost their early edge and the amateurs got a foot hold in the game without threatening.
But they were gifted an equaliser in the 31st minute when Simonsen came way off his line in an attempt to catch Darren Miller's free-kick from just inside the Rangers half.
The 35-year-old, who now has new signing Lee Robinson for competition for the right to deputise for the injured Cammy Bell, did not get there and Quinn got his head on the ball to guide it into the empty net.
Queens finished the half on top but Rangers reasserted their authority after the restart.
Bilel Mohsni came close with a diving header before the visitors regained the lead in the 53rd minute.
The home defence were stretched as Rangers piled men into the box and Peralta latched on to McCulloch's blocked shot and lifted the ball into the six-yard box for Boyd to nod home.
A great block from David McGregor prevented Clark from adding to the lead following a strong run from Lee Wallace.
Simonsen redeemed himself with a point-blank save from Ross McPherson's header before Macleod hit the post from 22 yards and then arrowed a shot just over the top corner after Clark had led a break following some Queens pressure.
A wave of cheers went round the crowd as news filtered through that Maribor had opened the scoring at Celtic Park and the away fans were almost celebrating again but Mohsni's header was cleared off the line.