Stephen Hughes crashed his spot-kick off the bar and substitute Cammy Smith saw his effort saved by Craig Samson as the Dons crashed out after the tie finished 2-2 in normal and extra-time.
Despite Aberdeen’s bright start, it was Danny Lennon’s men who took an early lead.
Jamie Langfield could only push a Steven Thompson header onto the crossbar, and the ball fell kindly for Sam Parkin to fire home from close range.
Aberdeen equalised midway through the first half. Mark Reynolds’ cross drew goalkeeper Samson off his line and Scott Vernon looped a header beyond the despairing grasp of the goalkeeper.
It was a much more solid looking Buddies that emerged after the interval, and they showed the steel required to regain their lead.
Russell Anderson saw his clearance blocked on the edge of the area, and Kenny McLean sent a superb first time strike beyond Langfield from the corner of the penalty area.
But in the second minute of injury-time Josh Magennis turned home from close range after Samson had parried Smith’s low strike.
St Mirren’s nerves had returned, and early in extra-time Samson gave away a cheap throw from which Stephen Hughes found space and cracked a shot off the bar from 15 yards.
However, the game then went to penalties and Samson made the decisive save.