Murray Davidson headed Saints ahead in the 58th minute at Fir Park on Saturday, moments after Darren Randolph had saved Dave Mackay's penalty when Hammell was penalised for Chris Millar going down.
Saints looked like securing the win against a home side looking tired from their Champions League trip to Athens and with three young substitutes on the park.
But one of those, McHugh, levelled in the 78th minute and referee Iain Brines soon evened up the teams when Rowan Vine was sent off on his first start for a second bookable foul on Shaun Hutchinson.
Motherwell pushed for a winner and only some excellent stops from goalkeeper Alan Mannues and some desperate defending prevented them getting one.
Only 4,490 fans, including 292 Saints supporters, turned out at Fir Park for the game on Sell Out Saturday, a campaign aimed at filling out SPL grounds, but they were rewarded with an incident-packed second half after a tight first period.
Motherwell had brought back Michael Higdon following their 3-0 defeat by Panathinaikos while Vine started in place of Gregory Tade, who was sent off in last weekend's defeat by Hearts.
Randolph survived an early scare when he left Callum Davidson's sliced cross and it bounced off the top of bar. The Motherwell goalkeeper fumbled it as it fell down but Hutchinson cleared.
Motherwell soon got a grip on possession but Saints put 10 men behind the ball and were proving hard to break down.
The hosts' best first-half chances came on the break. Ojamaa burst forward and fired in a 22-yard shot that Mannus pushed wide.
Stevie Hammell then dropped a lofted ball into the path of Jamie Murphy but his lob from the edge of the box bounced wide.
Motherwell did break Saints down a couple of times. A direct run from Nicky Law set up Ojamaa but he shot straight at Mannus from 18 yards and the goalkeeper pushed the ball away.
Law then had a chance himself after some quick passing allowed Hammell space to cross but the midfielder could not direct his volley on target.
At the other end Randolph tipped over Craig's 35-yard free-kick.
McHugh replaced Omar Daley at half-time and his side soon survived a penalty appeal when Hasselbaink fell after he got in front of Hutchinson.
Millar shot just wide from 20 yards after Vine had held the ball up before Higdon headed wide of the near post after Ojamaa had got round the outside.
Motherwell then put themselves under pressure as they missed two chances to clear the ball on the edge of the box and Craig lobbed the ball over the top for Millar to run on to.
The midfielder got ahead of Hammell and fell under pressure. The claim seemed weaker than Hasselbaink's but Brines pointed to the spot and showed Hammell a straight red card.
Mackay took the penalty low to Randolph's right but the Irishman dived to push the shot away with one hand.
Motherwell did not take advantage of the reprieve though, and Davidson ran to meet Craig's corner unchallenged and head inside the near post a minute later.
Ojamaa was sacrificed to allow Zane Francis-Angol to fill in at left-back while captain Keith Lasley was taken off for Steven Hetherington.
Hasselbaink and Craig shot just wide from the edge of the box as Saints looked like wrapping up the points.
But another positive burst from Law allowed the midfielder to square the ball for the unmarked McHugh to finish from 12 yards.
The teams were evened up two minutes later when Vine caught Hutchinson late and Motherwell came closest to winning it.
Mannus produced an excellent one-handed save from Higdon's header after a cross from Murphy.
He then stopped Simon Ramsden's header after Tom Hateley's corner and Saints survived a desperate scramble as McHugh tried to bundle the ball over the line.
Hutchinson seemed certain to convert the rebound from eight yards but his shot struck a grounded Saints defender and spun over the bar.