A try from Stuart Hogg, 11 points from the boot of Russell and two penalties from Duncan Weir - in what was his 100th appearance for the Warriors - helped ensure a memorable win at Rugby Park in Kilmarnock.
It may not have been enough to see Warriors reach the knockout stages, but Townsend could find no fault with his side's efforts.
Townsend told Glasgow's website: "I'm delighted for the players and the supporters. It was great to see the supporters travel here in large numbers and create such an atmosphere. We loved playing here, and it feels great to have a win at the end of it.
"I'm very proud of the players. They've had to put up with me shouting at them in training and they've had a couple of narrow defeats to deal with as well, so to get a win against a top quality side like that will give them such satisfaction."
There was also an emphatic 56-3 victory for Ulster Rugby at home to Oyonnax on Saturday as they finished second in Pool 1 - though results did not go their way in the race to the quarter-finals.
There were eight tries in total for Les Kiss's men as Rob Herring, Darren Cave, Rory Scholes, Sean Reidy, Craig Gilroy, Robbie Diack, Ian Humphreys and Jared Payne all crossed the whitewash.
Two tries from Ronan O'Mahony and scores for David Kilcoyne and Connor Murray helped Munster to a bonus-point 28-5 win over Benetton Treviso on Sunday.
Ospreys narrowly missed out on qualification to the quarter-finals as their 33-17 defeat at Exeter Chiefs on a dramatic European Sunday, while the day before Scarlets were defeated 22-10 at home to Northampton Saints and Leinster lost 51-10 at Pool 5 winners Wasps.
In the European Challenge Cup, Connacht booked a quarter-final at Grenoble by beating Enisei-STM 47-5 in their final Pool 1 match on Saturday.
Tries from Tiernan O'Halloran, Matt Healy (2), Denis Buckley, Danie Poolman, Robbie Henshaw, Tom McCartney and Caolin Blade ensured they topped the pool following Newcastle Falcons' win over Brive.
And Newport Gwent Dragons are also in the last eight and travel to Gloucester despite the 35-8 loss at Sale Sharks on Thursday.
Cardiff Blues finished their European campaign in style with a 74-6 win at home to Rugby Calvisano on Friday night, while Edinburgh lost 34-23 away at Grenoble and Zebre ran Gloucester close in their 14-11 loss.
To buy tickets for the GUINNESS PRO12 Grand Final click here. Also follow us on Facebook, join the conversation on Twitter, sign up to our YouTube channel for extensive match highlights and sign up for our newsletter for regular updates on the GUINNESS PRO12.