Devante Cole's second half winner puts Graham Alexander's side 11 points clear of bottom team Hamilton with just four matches of the season remaining.
But St Mirren will be aggrieved they got nothing from a game in which they bossed possession and saw them miss a glorious chance to take the lead in the first half when Jamie McGrath’s weak penalty was saved by Liam Kelly.
Motherwell threatened first when Nathan McGinley – preferred to Jake Carroll at left back – delivered a cross from the left which Cole headed narrowly wide from a good position.
McGrath then should have put the visitors in front. Lee Erwin's set-up sent the Irishman in on goal but his shot was weak and easily saved.
Ilkay Durmus then sent a 25-yard free-kick just off target as the away team pushed for an opener.
Motherwell then had a great chance of their own. Cole played in Chris Long but keeper Jak Alnwick rushed out to block the English forward.
St Mirren then had two penalty claims in the space of four minutes.
Durmus' cross struck Robbie Crawford on the arm but referee Kevin Clancy waved it away. Clancy then did award a penalty to Saints shortly afterwards when Stephen O'Donnell brought down Dylan Connolly on the corner of the Motherwell box - but McGrath missed for the first time this season after eight successful strikes from 12 yards.
St Mirren had one final chance before half-time, Erwin pulling Marcus Fraser's long diagonal ball out the air before Kelly denied him with a fine stop.
Motherwell forward Jordan Roberts was stretchered off early in the second half after an accidental collision with Fraser.
The hosts scored the only goal on 62 minutes. Long's cross from the right was saved by Alnwick but rebounded against Cole and across the goal line.
Allan Campbell could have extended the hosts’ lead only for Alnwick to deny him, before Cammy MacPherson's header drifted just wide at the other end.