Peter Enckelman saved Kris Commons' penalty after three minutes and the Saints goalkeeper went on to enjoy a fine afternoon with a string of saves.
Mackay's deflected shot on the hour mark sealed a miserable day for the Parkhead side who hit the woodwork through Commons - a floated free-kick - and substitute Paddy McCourt, who side-footed a shot against the post after weaving his way into the box.
Defeat adds to manager Neil Lennon concerns ahead of Thursday night's Europa League play-off second leg against Sion in Switzerland following their goalless draw in the first game.
A strong start by Motherwell was not enough to hold back a determined Rangers side, who won 3-0 in the SPL at Fir Park.
Motherwell had most of the play but Ally McCoist's side counter-attacked to victory in what turned into a comprehensive defeat for Stuart McCall's side at Fir Park.
The highlight was a classy first time finish from Kyle Lafferty on the stroke of half time, which was sandwiched by another neat breakaway goal from Gregg Wylde and a header from Steven Naismith.
Steven Davis's corner was met by Nikica Jelavic and the Croat's header rebounded in off of the head of Naismith. The young Scottish winger did not know a lot about the goal but that didn't stop him from claiming the goal with glee.
The result ends Motherwell's unbeaten start to the season and was a welcome response to Rangers' last minute defeat to Maribor in the Europa League.
Kilmarnock and Hearts shared the spoils after an entertaining but goalless match at Rugby Park.
The hosts created the majority of the chances, beginning with a first-minute James Dayton free kick and further opportunities for Paul Heffernan in each half, plus a close call by Gary Harkins after the break.
Hearts had fewer opportunities on goal but saw Stephen Elliott hit the woodwork at the end of the first half and have the ball in the net on 83 minutes, only to be flagged offside.