Goalkeeper Trevor Carson, skipper Carl McHugh and Charles Dunne were sent off in the second half as Motherwell endured a terrible day in Perth.
Saints secured an early advantage from Steven MacLean, and the double from on-loan Rangers forward O’Halloran could have been a hat-trick, but he missed a late penalty before Murray Davidson netted St Johnstone’s fourth.
The visiting Steelmen had briefly remained in contention when Andrew Rose nodded home midway through the first half, but Stephen Robinson’s men were left to rue three red cards shown by referee Craig Thomson.
Carson was controversially adjudged to have handled outside his box in the 63rd minute and two minutes after O’Halloran’s second strike, McHugh was dismissed for a second yellow-card offence after lunging in on Brian Easton.
In the 89th minute defender Dunne, who was also sent off in midweek against Ross County, exited for downing Graham Cummins.
Substitute goalkeeper Russell Griffiths denied O’Halloran a hat-trick from the spot but Davidson stroked home the fourth moments later.
The hosts forged ahead in the eighth minute when MacLean instinctively hooked Stefan Scougall’s deflected 18-yard effort over his head and into the net.
O’Halloran doubled their advantage in the 18th minute. He was picked out wide on the left by a MacLean flick and cut inside full-back Richard Tait to lash a low shot into the far corner.
Motherwell then peppered the St Johnstone box with crosses and when a free-kick from McHugh was flicked on by Cedric Kipre, midfielder Rose jumped at the back post to bury a close-range header.
McHugh was cautioned in the 36th minute for halting David Wotherspoon in full flight.
Only a superb one-handed save from Saints goalkeeper Alan Mannus then prevented a re-run of Motherwell’s first-half goal minutes after the interval.
Once again Rose shook off marker Richard Foster when McHugh delivered a free-kick to the back post and the Northern Ireland international managed to touch it wide for a corner.
Thomson showed the red card for the first time in the 63rd minute when Carson, trying to gather a back-pass under pressure from MacLean, tumbled out of his penalty area clutching the ball.
Motherwell contested the decision but Thomson acted on the signal from his well-placed assistant.
Reserve goalkeeper Griffiths took over in goal with Gael Bigirimana sacrificed.
McHugh and Dunne joined him in the dressing room as the foul count mounted, and while Griffiths kept O’Halloran at bay from the penalty spot, Davidson rubbed salt in Motherwell wounds in the closing seconds.