Gary Teale gave Saints the lead in the 14th minute with a thunderous from 20 yards - and the Paisley side looked out of sight when they doubled their advantage after 52 minutes when Nigel Hasselbaink swept home a Graham Carey assist.
However, the Division One side were thrown a lifeline three minutes later when Sam Morrow headed home a Rocco Quinn free kick.
But despite late pressure from County the SPL side held out for a place in the last eight.
The hosts made wholesale changes from the side which drew with Raith on Saturday.
Joe Malin replaced Michael Fraser in goal and Jonny Flynn, Russell Duncan, Michael Gardyne, Morrow and Quinn also came in, with Paul Lawson and Grant Munro dropped to the bench and Colin McMenamin, Iain Vigurs and captain Richard Brittain rested.
St Mirren's only change from the side which drew with Motherwell saw Nigel Hasselbaink restored to the starting line-up, with Dougie Imrie cup-tied.
Mark Corcoran got behind the St Mirren defence in the first minute but his cross into the box glanced off Morrow's head and behind for a goal-kick.
In the next County attack Gary Miller sent in a dangerous ball across goal but there were no takers, while Hasselbaink tested goalkeeper Scott Boyd with a low shot at the other end.
Hasselbaink tried another shot at goal from the other side of the pitch but goalkeeper Malin made a comfortable save.
St Mirren took the lead in the 14th minute when David Barron's cross was headed down by Steven Thompson and Teale drilled the ball into the corner of the net from 20 yards.
Hasselbaink was causing the home defence all sorts of problems and was not far away with a rasping shot which just cleared the crossbar.
County pushed for an equaliser and Quinn made a good run down the middle in the 32nd minute but his forward pass into the Saints box for Steven Craig was too strong and the chance was lost.
Thompson was sent off four minutes later after elbowing Flynn in the face - and soon after the hosts were awarded a free-kick 25 yards out. However, Scott Morrison's attempt at goal was easily saved by Saints goalkeeper Craig Samson.
Saints threatened in the 50th minute when a Teale cross was only partially cleared by Corcoran. The ball fell for Jim Goodwin, who let fly at goal but Malin dived full length to his right to push the ball away.
The 10 men doubled their lead a couple of minutes later when Graham Carey cut in from the left and squared the ball for Hasselbaink, who fired past Malin at the far post.
County hit back three minutes later when a Quinn free-kick from the left touchline was headed in off the underside of the crossbar and into the net.
And the home side had another chance when a slack kick out from Samson fell for Craig, whose ball inside was scooped over the crossbar by Morrow.
County were applying a bit of pressure and Gardyne and Craig linked well on the right but Gardyne's ball into the box was straight at Samson.
The hosts made a double substitute with six minutes to go in an attempt to save the game with Kurtis Byrne and Alex Cooper coming on for Gardyne and Quinn.
Cooper got an early opportunity with his first touch but his shot sailed well over the bar - and the home side's final chance came four minutes from time - but Samson pulled off a fine save to deny the same player.