After Stoke's Tommy Smith had been shown a straight red card in the 85th minute for a lunge on Claudio Gomes, Stoke coaches Dean Holden and Rory Delap, plus Barnsley assistant Joe Laumann, were red-carded following a mass touchline brawl in the dying seconds.
"We were trying to win the game and Dean went in there trying to get the ball back," said O'Neill.
"It was clear the Barnsley staff were trying to slow the game down, but a punch was thrown and the next thing you know there's 20 or 30 people involved.
"There was nothing really behind it, other than us trying to retrieve the ball.
"I won't ever be angry with my staff for that. We were attempting to get the game going again and trying to win the game with 10 men.
"I'm not sure how we ended with two of our staff being sent off, but I've no issue with my staff sticking up for one another."
On the Smith red card, O'Neill also backed his player following what he clearly thought was a harsh sending off decision by referee Leigh Doughty.
"If you slow it down, the challenge doesn't look great," added O'Neill. "I don't think there was any malice there, though.
"The ball seemed to run away from Tommy a bit.
"The reaction of their player was a bit excessive and - though by the letter of the law - it's a red card, I think a yellow would have sufficed."
An even first half ended dramatically at the bet365 Stadium.
Sam Surridge fired the hosts ahead, before Cauley Woodrow's curling free-kick levelled matters.
That was before Stoke midfielder Mario Vrancic saw a spot-kick saved by Brad Collins in added time.
The melee at the end clearly took the shine off the game, though, as Barnsley boss Markus Schopp acknowledged.
He said: "It all started with the Smith red card I think. The Stoke staff weren't happy.
"It was an unnecessary situation, but I didn't see too much of it.
"Maybe we should have been a bit more quiet but the Stoke staff had been shouting at ours.
"There had been arguing after the player had been sent off.
"Both teams were clearly desperate to get the three points and this is sometimes what can happen."
Schopp was also keen to praise Collins after his "unbelievable" performance on the night.
He added: "Brad was like a wall between the goal. His performance was unbelievable.
"It was a really special day for us and I'm delighted.
"He always does a great job for us and he proved that tonight."