John McGinn's opening goal was cancelled out by Kris Boyd but a second half Paul McGowan penalty and a strike from Conor Newton two minutes from time secured the spoils for the Buddies.
St Mirren boss Danny Lennon fielded a side that featured a number of players destined to leave the club in the summer, including goalkeeper Craig Samson who looks set to join Kilmarnock.
A scrappy contest came to life after 20 minutes when McGinn opened the scoring for the Buddies, the midfielder volleying into the bottom corner of the net from five yards after getting on the end of Newton's cross from the by-line.
But the lead only lasted five minutes, with Kilmarnock striker Boyd beating the offside trap and goalkeeper Samson to the ball before toe-poking home.
David van Zanten looked to have edged the visitors back into the lead but his lobbed effort fell agonisingly the wrong side of the post.
Van Zanten also felt he should have been awarded a penalty after Killie keeper Cammy Bell appeared to drag him down in the area but referee Willie Collum was unmoved.
Sam Parkin, one of the contingent leaving St Mirren Park in the close-season, should have done better with a header as both sides struggled to create further goalscoring opportunities.
But the visitors stepped up a gear in the final 15 minutes, with teenager Anton Brady coming off the bench to earn the penalty that led to the second goal.
McGowan fired the spot-kick past Rangers-bound Bell after Brady was adjudged to have been fouled in the area by fellow-19-year-old Lee Ashcroft (75).
Newton then put the result beyond doubt as he beat three defenders before getting away a shot that evaded Bell before finding the back of the net.