He had also urged the side to win for long-time club servant John Barclay, who played what could be his final home game for the club on his 150th appearance.
Glasgow fly-half Duncan Weir missed two early penalties and the Ospreys took advantage when Dan Biggar threaded the posts after just eight minutes.
Flanker Barclay thought he'd scored under the posts only to have the referee award a five metre scrum but Scottish international prop Grant bundled over on 11 minutes and Weir was unerring with the conversion.
The hosts maintained the momentum but Ospreys' defence held firm until scrum half Niko Matawalu's neat kick was chased down by Sean Maitland, whose try was awarded after it had been referred to the video referee.
Weir continued to struggle with his kicking rhythm as he missed the resulting tough conversion and a penalty but by 30 minutes the hosts had further increased their advantage.
Grant crashed across the line for his second try and Weir's conversion and penalty on the stroke of half-time secured a 22-3 lead.
Ospreys head coach Steve Tandy left his side under no illusions about the second half task, with a win crucial to maintaining their slight advantage over Scarlets in the last play-off place.
And just seven minutes after the restart replacement prop Cai Griffiths ran under the posts and Biggar converted to slim the deficit.
However, another moment of brilliance from Matawalu put the hosts back in control, he executed a brilliant break from a penalty to secure a valuable fourth bonus point try after 56 minutes.
Sam Lewis powered across for the Ospreys in the 61st minute with the unerring Biggar again on target but Glasgow, roared on by a crowd of 6,642, their biggest of the season, held firm.
Pete Horne, who had just replaced Weir, threaded a 70th minute penalty, after another moment of solo brilliance by Matawalu had put the visitors on the back foot.
Graeme Morrison, in the final home game of his tenth season with Glasgow, almost scored late on while Barclay's all-round endeavour saw him awarded man of the match.
However, Canadian winger DTH Van der Merwe collected an 80th minute loose pass and scampered clear to complete the rout.
|Glasgow Warriors Score Card|
|DTH van der Merwe||1||5|
|Ospreys Score Card|