Curtis Main and Declan Gallagher returned to haunt their former club as the Saints leapt up to fourth in the Premiership table.
The ex-Dons duo were both on the scoresheet in what could turn out to be a crucial win for the Paisley side's top-six hopes.
St Mirren were handed an early boost at Pittodrie when Ross McCrorie saw red after elbowing Charles Dunne, with Main's powerful header breaking the deadlock early in the second half.
Aberdeen were gifted a route back into the feisty match when Marcus Fraser brought down Duk Lopes, with Bojan Miovski netting from the penalty spot.
But Main quickly restored Saints' lead, producing a wonderful touch and finish to put the visitors back in front.
And substitute Gallagher made certain of all three points with a late header to make it 3-1, sending his side soaring above Livingston and Hibs and into fourth.
Stephen Robinson resisted the temptation to throw deadline day signing duo Thierry Small and Tony Watt straight into the starting line-up, with the pair both starting the game on the bench.
Alex Greive replaced the injured Jonah Ayunga up front, with Greg Kiltie slotting into the midfield berth vacated by Ethan Erhahon after he joined Lincoln City. Alex Gogic continued in defence in the absence of Joe Shaughnessy.
The Buddies were gifted the perfect start to the evening when Ross McCrorie was sent for an early bath just six minutes into proceedings after elbowing Charles Dunne in the head.
The home fans were furious that the St Mirren centre back wasn't pulled up for initially stepping across McCrorie, but the Saints weren't complaining when referee Grant Irvine flashed the red card after a lengthy VAR review.
Angus MacDonald swiftly picked up a yellow card for scything down Greive on the left wing as the Paisley side looked to immediately make their numerical superiority count.
The Buddies were getting into promising positions on both flanks but couldn't find a quality delivery to pick out Curtis Main or Alex Greive in the box.
Greive pounced on a ricochet in the box but his close-range effort was blocked away to safety as the visitors continued to increase the pressure on the 10-man Dons. Main flashed a header wide from a Tanser cross as Saints continued to press for an opener.
Dunne was treading an unnecessarily fine line when he went through the back of Graeme Shinnie, with the Dons screaming for a red. Luckily for the Saints man Irvine only flashed a yellow card, which sparked a stramash between both sets of players that resulted in further cautions for Duk Lopes, Ylber Ramadani and Greive.
Main missed a glorious opportunity to break the deadlock just before half-time. Mark O'Hara drove to the line before pulling back to the striker, who dragged wide from just inside the six-yard box.
Robinson took the wise decision to take Dunne out of the firing line at the break, with the centre back replaced by Declan Gallagher who stepped into the defence against his former club.
Ryan Strain produced some lovely footwork on the right wing to burst past two Dons players before Shinnie eventually snuffed out the danger.
The Saints were struggling to make their numerical advantage count, with Aberdeen defending resolutely and looking to spring counter attacks.
Marcus Fraser produced a perfectly timed tackle to stop Duk in his tracks just when the pacey striker looked to have burst in behind the St Mirren defence.
While struggling to cut through Aberdeen's defence in open play, the Saints forced their way ahead from a clinical set piece after Shinnie was adjudged to have handballed near the left corner flag.
Main returned to haunt his former side, powering a header past Joe Lewis at the front post from Strain's pinpoint free-kick.
O'Hara blasted over from the edge of the box as the Buddies threatened to double their lead and take the game away from the Dons.
Mattie Pollock was next to be dished out a yellow card after he clattered into Greive as the striker raced towards the box.
Keanu Baccus was next to try his luck from distance, cutting inside before unleashing a fierce strike that Lewis tipped over the bar.
The Buddies were edging nearer to that crucial second goal and couldn't have come much closer when Kiltie's rattled the crossbar.
There was a first look for the travelling support at their new striker, with Watt replacing a tiring Greive.
Just a few minutes after Kiltie almost wrapped up all three points the Dons levelled against the run of play. Duk burst into the box and went down under pressure from Fraser, with referee Irvine quickly pointing to the spot. Bojan Miovski made no mistake, slotting down the middle with Carson diving to his left.
Far from going into their shells, the Buddies burst forward with a renewed determination to get back in front.
And they did just that with Main again the star of the show. A clever cross in from Baccus found the in-form forward, who took an excellent first touch to set himself before volleying sweetly past a sprawling Lewis. The striker enjoyed his moment, winding up the Dons fans as he celebrated netting again against his former employers.
Strain saw a shot well saved by Lewis at the near post as the Saints tried to secure all three points.
But it was Gallagher who had the last laugh against his former side, heading in from a Thierry Small corner to put the icing on the cake for the Paisley side.
READ MORE:
Don't miss the latest Renfrewshire headlines – sign up to our free daily newsletter here