St Mirren goalkeeper Craig Samson had denied the visitors with a string of superb saves, but Hateley curled home from 20 yards with virtually the final kick.
The home side had their fair share of possession and spells of superiority but could not seriously trouble Motherwell goalkeeper Darren Randolph.
Hateley's match-winning intervention stole the headlines from Samson, who made six saves of note - the best coming from Nicky Law and Michael Higdon in the first half.
The home side lost their unbeaten record and had cause for complaint over referee Iain Brines' role, the free-kick coming when Gary Teale looked to have won the ball, but the official had angered both sides with some strange decisions throughout.
Motherwell remain ahead of Celtic without having conceded a goal after edging the battle of two of the SPL's most impressive early performers.
Both sides had been forced into several changes with St Mirren having lost Darren McGregor to a cruciate ligament injury and seen Nigel Hasselbaink lose an appeal against the red card he received against Dundee United.
Marc McAusland came into defence while Graham Carey and Kenny McLean stepped in with midfielder Steven Thomson absent.
Motherwell had also lost a player to serious injury and suspension with Steven Saunders suffering a ruptured Achilles on Scotland Under-21 duty and Keith Lasley out following his red card against Hearts.
Shaun Hutchinson returned from a head knock to replace Saunders while Ross Forbes stepped in to the midfield.
St Mirren had a slight edge in a tight opening spell but could not carve a real chance and Motherwell created the first real opening in the 15th minute. Higdon laid Law's low cross back to Murphy, whose powerful 18-yard effort was pushed wide by Samson.
St Mirren were soon back on the attack but they were caught out when Jim Goodwin was dispossessed by Higdon just inside his own half to allow Law a clear run on goal.
The former Rotherham midfielder shot from just outside the box but Samson got a strong hand to divert it wide.
Hutchinson turned Teale's inswinging corner just wide of his own goal and Samson again saved the Buddies in the 26th minute.
Murphy worked his way into the box before rolling the ball to Higdon, who held off his man before shooting on the turn from 12 yards, but Samson dived to his left to push wide.
Saints got their first effort on target just before the break with Randolph comfortably behind Teale's long drive but Motherwell created the final chance of the half when Higdon glanced Stevie Hammell's cross wide.
St Mirren applied the pressure early in the second half. Paul McGowan's shot was blocked following a corner, Steven Thompson headed wide under pressure and Hutchinson made a great clearance from Teale's cross after a sharp move.
Samson again saved Saints though in the 65th minute. McGowan's touch inadvertently set up Higdon to shoot from 20 yards and Samson got down to parry the striker's low effort.
The St Mirren goalkeeper soon came off his line to block from Murphy as the Motherwell youngster edged past two defenders following a long ball.
Thompson volleyed over from 35 yards after Steve Jennings struggled to head a high ball back to Randolph before Samson again saved the hosts.
The former Ayr goalkeeper threw himself to his left to stop a high 30-yard strike from Forbes and the rebound flashed past Higdon.
Saints finished strongly but Motherwell's back four defended superbly and Hateley had the final say.
Teale was harshly penalised for a sliding tackle on Law just outside the left edge of the box to allow the Motherwell right-back to curl the ball into the far corner and spark wild celebrations among the 1,000 travelling fans behind the goal.