Match ends, Derby County 4, Barnsley 1.
Derby County 4-1 Barnsley
Barnsley were relegated from the Championship and parted company with head coach Jose Morais as they slipped to a heavy defeat against a Derby side who secured the final play-off place.
The Tykes could have lost and still stayed up, depending on other results.
Although rivals Burton lost at Preston, Bolton beat Nottingham Forest with two late goals to send Barnsley down.
Cameron Jerome, Matej Vydra, David Nugent and Tom Lawrence scored for Derby, with George Moncur replying.
Jose Morais, who only joined Barnsley in February, had a clause in his contract to leave following relegation and the club confirmed the Portuguese's exit within 30 minutes of the final whistle.
The Tykes still finished above Burton, who conceded a late goal to lose against 10-man Preston.
And Bolton were losing 2-1 with three minutes remaining - a result that would have seen the Tykes stay up on goal difference.
But the Trotters scored twice at the death to break Barnsley hearts.
Realistically, Gary Rowett's play-off chasing Derby side needed just a point to prolong a topsy-turvy season which saw them in with a great chance of automatic promotion until they fell away in the new year.
The won this match at a canter to ensure a play-off double-header against Fulham, who missed out on a top-two spot by losing to Birmingham.
Jerome sets Rams on their way
Jerome's first-half one-on-one finish on the break, after great work by Bradley Johnson, settled early nerves.
It was the striker's fourth goal in three games for the Rams and they stormed to victory after the interval.
Substitute Vydra's close-range strike as good as sealed the win against a Tykes side who showed plenty of commitment but offered very little goal threat despite a lively start.
Vydra teed up fellow substitute Nugent to head the third, and Lawrence tapped in number four after some excellent approach play by Nugent.
Barnsley pulled one back with 10 minutes remaining when Moncur smashed a superb strike into the top corner.
With moments to go, Derby were on course to finish fifth, but former Rams striker Patrick Bamford grabbed a 97th-minute equaliser for Middlesbrough against Ipswich to ensure it was Boro who will face Aston Villa in the play-offs.
Barnsley's season of struggle
Barnsley's second season back in the Championship took an unexpected twist at the start of February, when they were one point above the relegation zone, as manager Paul Heckingbottom left to take charge of Yorkshire rivals Leeds United.
The departure of Heckingbottom, who had overseen Barnsley's promotion from League One in 2016 and guided them to a creditable 14th-place finish last term, "shocked" the club as it had come a few days after he had signed a new rolling contract at Oakwell.
Morais arrived as head coach, but only three wins in 15 matches have followed and he has now gone again.
Barnsley have struggled for goals, with none of their players managing to reach double figures for league goals this term. Tom Bradshaw topped the list with nine.
Sunday's result ensured that, despite Barnsley finishing above Wolves on goal difference in 2016-17, the Tykes will be playing two divisions below this season's champions in August.
Derby County manager Gary Rowett:
"If you had asked me about the play-offs about eight or nine games ago I would have said, even if we get in, we're not going to have enough momentum or form to really challenge, although we know they are unpredictable.
"What I would say now is, after the last four games, we have performed really well in different ways in all of them. You can see with the players when they train there's a bit of extra zip and a bit of extra belief.
"As we know sometimes, you can change the formation but it's about affecting the players' psychology and that's what the last four games have done. They will be going into these next games full of determination and we've almost been given a second chance.
"All the sides in there are good sides and have good quality, us included, and are more then capable of winning the play-offs - and I don't think form is going to have that much bearing on what happens now."
- 29OlssonSubstituted forVydraat 38'minutes
- 32JeromeSubstituted forNugentat 66'minutes
- 10LawrenceBooked at 14minsSubstituted forLedleyat 87'minutes
- 17YiadomBooked at 66mins
- 6LindsayBooked at 52mins
- 21MahoneySubstituted forMoncurat 70'minutes
- 20PottsSubstituted forThiamat 61'minutes
- Simon Hooper
- Shots on Target
Second Half ends, Derby County 4, Barnsley 1.
Foul by Craig Forsyth (Derby County).
Kieffer Moore (Barnsley) wins a free kick on the right wing.
Substitution, Derby County. Joe Ledley replaces Tom Lawrence because of an injury.
Attempt saved. Adam Hammill (Barnsley) right footed shot from outside the box is saved in the centre of the goal. Assisted by Mamadou Thiam.
Offside, Derby County. Matej Vydra tries a through ball, but Andreas Weimann is caught offside.
Goal! Derby County 4, Barnsley 1. George Moncur (Barnsley) right footed shot from outside the box to the top right corner.
Attempt missed. Adam Hammill (Barnsley) right footed shot from outside the box is just a bit too high. Assisted by Gary Gardner.
Corner, Derby County. Conceded by Liam Lindsay.
Attempt missed. Matej Vydra (Derby County) right footed shot from very close range misses to the right. Assisted by Andreas Weimann with a cross.
Goal! Derby County 4, Barnsley 0. Tom Lawrence (Derby County) right footed shot from the centre of the box to the bottom left corner. Assisted by David Nugent following a set piece situation.
Andreas Weimann (Derby County) wins a free kick in the attacking half.
Foul by Ethan Pinnock (Barnsley).
Substitution, Barnsley. George Moncur replaces Connor Mahoney.
Richard Keogh (Derby County) wins a free kick in the defensive half.
Foul by Kieffer Moore (Barnsley).
Goal! Derby County 3, Barnsley 0. David Nugent (Derby County) header from the right side of the six yard box to the centre of the goal. Assisted by Matej Vydra.
Substitution, Derby County. David Nugent replaces Cameron Jerome.
Andy Yiadom (Barnsley) is shown the yellow card for a bad foul.
Bradley Johnson (Derby County) wins a free kick on the left wing.
Foul by Andy Yiadom (Barnsley).
Attempt missed. Kieffer Moore (Barnsley) header from the centre of the box misses to the right. Assisted by Adam Hammill with a cross following a corner.
Corner, Barnsley. Conceded by Andreas Weimann.
Corner, Barnsley. Conceded by Richard Keogh.
Attempt blocked. Mamadou Thiam (Barnsley) right footed shot from outside the box is blocked.
Substitution, Barnsley. Mamadou Thiam replaces Brad Potts.
Attempt missed. Tom Lawrence (Derby County) right footed shot from outside the box is high and wide to the right from a direct free kick.
Tom Lawrence (Derby County) wins a free kick in the attacking half.
Foul by Andy Yiadom (Barnsley).
Attempt missed. Oliver McBurnie (Barnsley) header from the centre of the box misses to the right. Assisted by Connor Mahoney with a cross.
Attempt blocked. Bradley Johnson (Derby County) left footed shot from outside the box is blocked. Assisted by Tom Lawrence.
Goal! Derby County 2, Barnsley 0. Matej Vydra (Derby County) right footed shot from very close range to the centre of the goal. Assisted by Cameron Jerome.
Attempt missed. Cameron Jerome (Derby County) right footed shot from the centre of the box misses to the left. Assisted by Bradley Johnson.
Liam Lindsay (Barnsley) is shown the yellow card for a bad foul.
Foul by Cameron Jerome (Derby County).
Kieffer Moore (Barnsley) wins a free kick in the defensive half.
Matej Vydra (Derby County) wins a free kick in the attacking half.
Foul by Liam Lindsay (Barnsley).
Corner, Derby County. Conceded by Andy Yiadom.