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.
Live Text Commentary
Full Time The final whistle is blown by the referee.90:00 +3:50
Callum Ball provided the assist for the goal.90:00 +3:50 Goal scored
Goal! - Tom Carroll - Barnsley 3 - 2 Derby A goal is scored by Tom Carroll from deep inside the penalty area to the bottom right corner of the goal. Barnsley 3-2 Derby.90:00 +1:02
Short corner worked by Matty Done.90:00 +0:12
Free kick awarded for a foul by Shaun Barker on Stephen Foster. Luke Steele takes the direct free kick.89:41
Craig Davies concedes a free kick for a foul on Shaun Barker. Jason Shackell takes the direct free kick.88:03
The offside flag is raised against Nathan Tyson. Indirect free kick taken by Luke Steele.86:11 Substitution
Substitution Bobby Hassell joins the action as a substitute, replacing Scott Wiseman.84:00 Booking
Booking Caution for Andy Gray.83:59
Jeff Hendrick fouled by Andy Gray, the ref awards a free kick. Direct free kick taken by Jason Shackell.83:13
Inswinging corner taken from the left by-line by Jamie Ward.79:47
Shot by Nathan Tyson from outside the box goes over the target.78:20
Shot by Jamie Ward from outside the box goes over the net.76:41 Substitution
Substitution Reuben Noble-Lazarus replaces Korey Smith.74:14
Corner taken by Jamie Ward played to the near post, Craig Davies makes a clearance.73:26
The referee gives a free kick against Craig Davies for handball. Free kick taken by Gareth Roberts.72:53
Matty Done produces a left-footed shot from just outside the box that misses to the right of the net.72:05
Matty Done takes a outswinging corner from the left by-line played to the near post, Gareth Roberts makes a clearance.69:47
Corner taken by Jamie Ward from the right by-line, Korey Smith makes a clearance.68:39 Goal scored
Goal! - Jamie Ward - Barnsley 3 - 1 Derby Jamie Ward hits the back of the net with a goal direct from the free kick from outside the box to the bottom right corner of the goal. Barnsley 3-1 Derby.
Free kick awarded for a foul by Nathan Doyle on Craig Bryson.65:04
Direct free kick taken by Jason Shackell.65:04 Substitution
Substitution Nathan Doyle joins the action as a substitute, replacing Michael Tonge.65:04
Free kick awarded for a foul by Craig Davies on Tom Carroll.63:20
The assistant referee signals for offside against Callum Ball. Free kick taken by Luke Steele.60:59
Corner taken right-footed by Michael Tonge to the near post, Gareth Roberts manages to make a clearance.59:50
Stephen Foster gives away a free kick for an unfair challenge on Callum Ball. Direct free kick taken by Jason Shackell.57:32 Substitution
Substitution Nathan Tyson joins the action as a substitute, replacing Ryan Noble.57:12
Shot by Tom Carroll from outside the area goes high over the crossbar.55:54
Outswinging corner taken by Michael Tonge from the right by-line, Craig Bryson manages to make a clearance.54:43
Ryan Noble fouled by Jimmy McNulty, the ref awards a free kick. Free kick taken by John Brayford.54:10
Jamie Ward takes a shot. Save by Luke Steele.53:07
Free kick awarded for an unfair challenge on Gareth Roberts by Craig Davies. Gareth Roberts restarts play with the free kick.51:43
Free kick awarded for a foul by Tom Carroll on Korey Smith. Stephen Foster takes the free kick.47:29
Unfair challenge on David Perkins by Jeff Hendrick results in a free kick. Rob Edwards delivers the ball from the free kick right-footed from left channel.46:40
Craig Davies challenges Craig Bryson unfairly and gives away a free kick. Jamie Ward delivers the ball from the free kick right-footed from left wing, save made by Luke Steele.45:01
The second half has started.45:00 +2:03 Half time
Half Time The ref blows to end the first period.42:58
Michael Tonge challenges Gareth Roberts unfairly and gives away a free kick. The free kick is swung in right-footed by Jamie Ward, save made by Luke Steele.40:01
Korey Smith concedes a free kick for a foul on Tom Carroll. Jamie Ward produces a cross, Headed effort from deep inside the area by Jason Shackell misses to the left of the goal.35:19
Michael Tonge takes a shot. Frank Fielding makes a save.33:59
Stephen Foster concedes a free kick for a foul on Callum Ball. Free kick taken by Gareth Roberts.32:09
Free kick awarded for a foul by Ryan Noble on Matty Done. Direct free kick taken by Luke Steele.29:37
Assist by Korey Smith.29:37 Goal scored
Goal! - Scott Wiseman - Barnsley 3 - 0 Derby Scott Wiseman scores a goal from inside the penalty area to the bottom left corner of the goal. Barnsley 3-0 Derby.28:19
Andy Gray gives away a free kick for an unfair challenge on Gareth Roberts. Frank Fielding takes the free kick.26:52
Foul by David Perkins on Jeff Hendrick, free kick awarded. The ball is swung over by Jamie Ward, Callum Ball takes a shot. Save by Luke Steele.25:34
Free kick awarded for an unfair challenge on Callum Ball by Rob Edwards. Free kick crossed by John Brayford, clearance by Korey Smith.25:01
Shot from outside the box by David Perkins misses to the left of the target.24:14
Craig Davies concedes a free kick for a foul on Jason Shackell. Direct free kick taken by Frank Fielding.22:13 Goal scored
Goal! - Andy Gray - Barnsley 2 - 0 Derby Power penalty scored by Andy Gray. Barnsley 2-0 Derby.21:34
John Brayford challenges Matty Done unfairly and gives away a Penalty.18:15
Unfair challenge on Michael Tonge by Tom Carroll results in a free kick. Michael Tonge produces a cross, Andy Gray takes a shot. Save by Frank Fielding.17:46
Tom Carroll concedes a free kick for a foul on Matty Done. Matty Done takes the direct free kick.16:12
Inswinging corner taken from the left by-line by Michael Tonge.15:16
Outswinging corner taken from the right by-line by Michael Tonge, Craig Bryson makes a clearance.14:51
The ball is crossed by Jimmy McNulty, clearance made by Gareth Roberts.13:42
Free kick awarded for a foul by Andy Gray on Gareth Roberts. Frank Fielding takes the direct free kick.10:24
The assist for the goal came from Korey Smith.10:24 Goal scored
Goal! - Matty Done - Barnsley 1 - 0 Derby A goal is scored by Matty Done from inside the penalty area to the bottom left corner of the goal. Barnsley 1-0 Derby.8:50
Inswinging corner taken by Michael Tonge, Stephen Foster takes a shot. Save made by Frank Fielding.8:06
Jeff Hendrick gives away a free kick for an unfair challenge on Korey Smith. Free kick crossed right-footed by Michael Tonge, John Brayford manages to make a clearance.3:23
Free kick awarded for an unfair challenge on Michael Tonge by Tom Carroll. Direct free kick taken by Michael Tonge.1:18
Corner taken right-footed by Michael Tonge from the right by-line, save by Frank Fielding.0:51
Corner taken right-footed by Michael Tonge, Shaun Barker makes a clearance.0:00
The game kicks-off.
Live data and text provided by our data suppliers