A late goal from substitute Curtis Main kept Middlesbrough only two points outside the play-off places.
In an entertaining game, Boro's Lukas Jutkiewicz had a shot cleared off the line and Tony McMahon hit the post.
Derby had their chances, Theo Robinson forcing a stop from Jason Steele, who also saved Paul Green's fizzing strike.
As both sides tired Barry Robson sent a fine cross for Main, who rifled only his second goal for the club to give Boro their first win in nine games.
Jutkiewicz had already seen a volley saved by Frank Fielding when he glided through the Rams defence and rounded the goalkeeper, only for Shackell to slide in and avert the danger.
McMahon's swerving free-kick came back off the woodwork, with Robson unable to head in the rebound.
Robinson and Green both put chances wide of the post as the opportunities continued for both sides.
A Jutkiewicz effort was parried by Fielding, only for Faris Haroun to fluff the rebound.
Boro boss Tony Mowbray opted to replace Jutkiewicz with teenage forward Main and it proved inspirational as he collected a defence-splitting pass and fired in the winner.
The Rams continued to pour forward, Steve Davies repelled by Justin Hoyte and Tom Carroll blasting over the bar as Boro secured three valuable points.