Craig Davies struck four times in 19 second-half minutes as Barnsley outclassed Birmingham in front of a less than half-full St Andrew's.
It was a first clean sheet in 24 away games for the Tykes, who had lost their last five league matches on the road.
The first goal did not arrive until the 50th minute from Stephen Forster at the far post after two men failed to clear.
Davies scored a hat-trick in 11 minutes as the Blues, later down to 10 men due to injury, were torn open in midfield.
In six of their last nine visits to St Andrew's Barnsley had failed to find the net and in 13 matches on their travels since January they had recorded only one point.
They were the better side throughout an extraordinary match but neither team had an effort on target in the opening half hour.
Keith Hill's side took the lead after a catalogue of errors from Birmingham that began with a skewed clearance from Jonathan Spector to gift the visitors a corner.
The set piece was completely missed by Marlon King and Forster was able to bundle home from inside the six-yard box.
Another defensive blunder allowed Barnsley to seize possession again and the ball was squared to Davies, who poked in from close range.
To the dismay of the 13,893 crowd, the visitors continued to carve open the Birmingham defence with some neat and simple passing movements, and Davies found himself in space again in the left channel before cutting inside, holding off two defenders and drilling a powerful shot into the bottom corner.
The 26-year-old Welsh international, who joined Barnsley from Chesterfield in 2011, waltzed through for his hat-trick, before Chris Dagnall was left unmarked at a right-wing throw-in to deliver a perfect cross for Davies to head in at the far post for Barnsley's fifth.
It was the Yorkshire side's biggest win since 1999 as Birmingham, who had only one shot on target in the match, succumbed to their worst home defeat for 25 years and manager Lee Clark kept his players locked in the dressing room for some time after the final whistle.
Birmingham manager Lee Clark:
"Losing any game at home is a massive disappointment but to lose by this margin is devastating.
"Any loss is tough to take but this one is very tough.
"We never started the game. We were lucky it was goalless at half-time in all honesty.
"It was a totally flat performance in every aspect. Barnsley played through us. It's an awful performance. There were lots of mistakes but everything we did was so flat. There was no urgency and it was lifeless."
Barnsley boss Keith Hill:
"There has been no better result but we performed equally well at Blackburn in midweek and got beaten.
"I am really pleased for everyone who believes in what we are trying to achieve at Barnsley.
"Craig Davies takes the honours but this performance has been achieved from the groundwork he put in last season.
"You have to keep players to educate them and Davies is a mobile target man who scores goals. It's as simple as that."