Louis Lynagh claimed two of seven tries scored against the run of play at The Stoop, his first a sensational solo score that started on his own 22 and left four beaten tacklers in his wake.
It needed the stars to align for Lynagh to even get on the pitch as only an injury-enforced reshuffle hours before kick-off created a vacancy on the bench that he filled until Oscar Beard limped off in the 17th minute.
The injury-troubled England stepped up and prospect took his chance beautifully, issuing a reminder of his finishing skills with Nick David and Danny Care also tormenting an Ulster side that had otherwise dominated.
By the time David, Andre Esterhuizen and Will Evans ran in additional tries, the Irish province were a spent force knowing the win they needed to progress was out of reach.
There was mixed news for England with Joe Marler lasting 40 minutes in his comeback from a biceps injury ahead of the Six Nations, but Beard was in obvious discomfort when he limped off in the opening quarter.
Quins need events elsewhere to go their way if they are to play their round-of-16 match in south west London, but the points avalanche in their final pool outing has strengthened their cause.
It looked an unlikely outcome as Ulster took early control of the game only to allow David to touch down from a quickly-taken line-out by Esterhuizen, who capitalised the visitors' loss of concentration.
Ulster launched consecutive raids originating inside their own half with one producing a try for David McCann made possible by the athleticism of wing Rob Baloucoune.
The Irish onslaught continued and the only surprise was the score remained 7-7, but disaster struck a second time for them when Smith launched Lynagh from his own 22 and the England prospect went on to score a stunning try.
Lynagh bulldozed through Billy Burns and outfought a floundering Jacob Stockdale to gather his own kick, but the score was also made possible by his electric pace and instinctive running.
Six minutes later and the jet-heeled 23-year-old was over again as Baloucoune failed to deal with Esterhuizen's mammoth hack forward, allowing the lurking Lynagh to produce a classy pick-up and touch down.
The theme of Quins scrambling their way out of pressure continued early in the second-half as hapless Ulster blew another promising spell and the critical blow was landed in the 48th minute when Care side-stepped over from close range.
Esterhuizen strode through the yellow shirts to add the fifth try and on this occasion the score came after a period of Quins tightening the screw rather than a counter-punch out of nowhere.
David and Evans went over in a high scoring finish that also produced tries for Ulster's Stuart McCloskey and Stockdale.