Barnsley put on a blistering first half performance to consign Derby to their first defeat in seven league games.
Matt Done gave the Tykes an early lead with a measured finish, before Andy Gray added a penalty when Done was tugged back by John Brayford.
Scott Wiseman's tidy finish made it three before the half-hour mark.
Jamie Ward pulled a goal back for the Rams with a fine free-kick and on-loan Tottenham midfielder Tom Carroll pulled another back deep into stoppage time.
But it was too late for the away side to salvage anything from the game, and Barnsley move just two points and one place behind the Rams in the Championship table.
The Tykes put the departure of leading scorer Ricardo Vaz Te to West Ham behind them and produced a first-half display which swept previously in-form Derby aside.
They had the visitors on the back foot from the off and it needed a magnificent reflex save from Frank Fielding to keep out Jim McNulty's header from an inviting Michael Tonge corner nine minutes in.
But Keith Hill's side were in front just a minute later through Done, before Gray's penalty was dispatched straight down the middle to double the home side's lead.
And it came as no surprise when the home side added a third goal after 29 minutes, when more neat passing cut open the Derby defence and full-back Wiseman opened his account for the Tykes.
Ward gave Derby a lifeline after 68 minutes when he rifled home a free-kick from 25 yards which appeared to go through the wall.
Derby debutant Carroll had a big shout for a penalty but referee Andy Woolmer waved play on, and Carroll's stoppage time strike proved to be in vain.