Goals from Marco Paixao and Martin Canning at St Mirren Park allowed them to put four points between themselves and bottom side Falkirk.
Saints had been scoring goals for fun recently but could not find the back of the net on a day when their misery was compounded by the dismissal of Lee Mair in the second half.
Buddies boss Gus MacPherson made just one change from their Co-operative Insurance Cup win over Motherwell in midweek, with Allan Johnston replaced by Stephen O'Donnell.
Accies boss Billy Reid named an unchanged side after narrowly losing to leaders Celtic in the SPL last week.
The home side should not have been short on confidence with 11 goals in their last four games and lying sixth in the table, in contrast to their visitors who were just a point off the bottom.
But it was Hamilton who enjoyed the best possible start to the game when they surged into the lead with just three minutes on the clock.
A Richard Hastings corner broke for James Wesolowski, whose shot was blocked, but Paixao reacted quickly to pounce on the rebound and stab low into the net.
St Mirren recovered and carved out a decent chance to equalise but Michael Higdon's effort flashed across the face of goal and just past Tomas Cerny's right-hand post.
Accies had the chance to increase their lead when James McArthur let loose with a powerful volley but goalkeeper Paul Gallacher did well to block and prevent the home side from falling further behind.
At the other end, Stephen McGinn tried his luck from distance in a desperate bid to haul Saints back into the game but he blasted well over from 25 yards, before Andy Dorman's deflected shot was smothered.
But it was Reid's men who found the back of the net again just four minutes before the interval. Paixao turned provider with the cross for Canning to rifle home.
St Mirren emerged for the second half determined to force their way back into the game and could have pulled a goal back shortly after the restart.
A Dorman free-kick picked out Higdon in the box and he connected with the header in front of goal only to nod just wide of target.
Jack Ross then played a lovely ball to Billy Mehmet, who unleashed a ferocious shot from the edge of the box that Cerny did well to tip over the crossbar.
But hopes of a comeback were dealt a blow when Mair picked up a straight red card for a last-man challenge on Mickael Antoine-Curier.
Hamilton could have put the game beyond Saints when Antoine-Curier's short pass was collected by McArthur and he unleashed a long, low drive which was gathered by Gallacher.
McArthur had another go, this time with a half-volley from the edge of the box but the Saints goalkeeper was up to the task.
Wesolowski then lashed over the bar but Saints knew there was no way back anyway as Accies claimed a rare victory in the SPL.