Super-sub Connor Sammon broke the hearts of 10-man Middlesbrough with a late winner as Derby stretched their winning run to four matches to cement fourth place in the Sky Bet Championship table.
Steve McClaren won the League Cup and reached a UEFA Cup final during his tenure as Middlesbrough boss and, in his first managerial game against his old club, he saw his new team emerge somewhat lucky winners as the Teessiders' brave resistance was finally broken.
Chris Martin had given Derby a 33rd-minute lead with his 10th goal of the season after Boro's Curtis Main was dismissed.
Dean Whitehead restored parity, before Sammon's late strike clinched a 2-1 win and the spoils for the Rams.
Jamie Ward replaced Johnny Russell in the Derby side that beat Wigan last time out, while Whitehead and Main came in for suspended Boro skipper Grant Leadbitter and Mustapha Carayol.
A cagey opening saw chances at a premium as the game threatened to be strangled by a midfield stalemate, with a Jake Buxton header and a Kei Kamara effort - both clearing the crossbar - the only chances of note in the opening 25 minutes.
Will Hughes and Craig Bryson harried and probed to try and find Derby an opening, but the audible groans from the home faithful when the latter curled a free-kick five yards over summed up the spectacle so far.
Kamara attempted an audacious bicycle kick that dropped not too far wide of Lee Grant's left-hand upright as Boro created a rare opportunity, but the pendulum swung Derby's way after 33 minutes when Boro striker Main left his foot in on Rams defender Buxton and was shown a second yellow card.
The best moment of the half came courtesy of Boro five minutes before the break, shortly after Bryson had tested on-loan Shay Given in the visiting goal, when the lively Albert Adomah skipped past several challenges and burst into the box.
Grant was, however, equal to his well-struck shot.
In first-half stoppage-time, the Rams gained the initiative when Bryson's sizzling low cross was prodded in by the sprawling Martin.
Boro head coach Aitor Karanka sent on Carayol for Jacob Butterfield at the break, while Jeff Hendrick replaced Eustace as McClaren also made a change for Derby.
Some nice pieces of trickery from Simon Dawkins on the edge of the area then saw him square a ball to Ward, whose driven effort was blocked by Given's legs.
With 17 minutes to go, Boro were back on level terms and it was all thanks to Carayol's artistry.
Superbly winning the ball just by the halfway line, he ran the length of Derby's half and cut the ball back to Rhys Williams.
His effort was blocked but kindly fell to Whitehead who rammed the ball into the bottom corner for his first Boro goal.
Derby struggled to muster a response, but pinched it at the death when Sammon got onto a bouncing ball to beat the stranded Given and break Boro's gritty rearguard action.