A last-gasp try by prop Duncan Jones made sure of the two bonus points they needed to pip Cardiff in the battle to earn the last Welsh place in the draw for the coveted competition.
Ospreys had made their intentions clear by racing into attack from the first whistle. They pinned the hosts inside their own 22 for entire opening 10 minutes – but could not turn pressure into points.
They had Glasgow on the run with their slick build-up work, but a combination of greed and resolute defence kept them out.
Full-back Gavin Henson was the most culpable visitor, darting through a gap then ignoring the four team-mates who were on his shoulder in support.
Predictably, he was hauled down a couple of paces short of the target and the chance was gone.
They paid the price for their lack of finishing power as Glasgow broke the deadlock with their first raid into enemy territory.
Scotland playmaker Dan Parks did the initial damage, charging out of his own danger zone.
Dave Millard and Graeme Morrison were each twice involved in the sweeping move along with Glenn Metcalfe, making his last appearance before his move to France.
The tide was stemmed a few metres from the line, but when the ball was recycled wing Sean Lamont found the power to force his way over. Parks added the conversion.
Then came another double setback for the jittery Ospreys. First, Henson was wide with a straightforward penalty attempt – then Parks stretched Glasgow’s lead from 30 metres for backline offside.
The Welshmen got their act together four minutes from the interval when lock Jonathan Thomas was driven over from a penalty lineout, Henson slotting the tricky kick.
However, Glasgow seized back the momentum just after the restart when Lamont showed off his impressive pace to cruise to the line from 35 metres out. Again, Parks made the difficult conversion look easy.
Even worse was to come for Ospreys as Parks scuttled over beside the posts, giving himself a formality of a kick.
Neath-Swansea refused to buckle and Andy Newman squeezed through from close range to keep his side in the hunt. Henson added the goal – then banged over a penalty from 40 metres to set up a dramatic finale.
But Glasgow responded in thrilling fashion with flanker Andy Wilson bagging try number four, and Parks again on target.
Henson then converted Richard Pugh’s score to give Ospreys fresh hope – only for Parks to bang over a penalty. But then came the Jones effort that salvaged the real glory.