Impressive Derby secured their first win in six games to put a damper on struggling Stoke's mini revival.
City had eased their relegation worries with a four-match unbeaten run but could have no complaints on the day.
Giorgi Kinkladze was their chief tormentor while Rams forwards Malcolm Christie and Lee Morris always carried a potent threat.
Derby coach Ross McLaren said: "It was a good all-round performance. This is a difficult place to come but our players showed a real appetite.
"We really got about Stoke in the second half and created some very good chances. Hopefully the three points can get us going again." Neither side gave much away in a cagey first half with Derby supplying the only serious threat in the 36th minute.
Morris left three defenders dead as he burst into the danger area but home keeper Steve Banks superbly saved his close-range shot. Derby turned up the heat at the start of the second period and Morris squandered another terrific opportunity to break the deadlock.
He spun past his marker from Kinkladze's pass but failed to get any power into his shot and allowed Banks a comfortable save.
But Derby's dominance continued and Christie gave them a 50th minute lead after Banks tipped over a fierce strike from Adam Bolder.
Kinkladze curled the resulting corner towards the penalty spot from where Christie converted a stunning volley into the roof of the net.
Stoke were looking out of sorts without the injured Peter Hoekstra and with Bjarni Gudjonsson out of position on the left flank.
But they should have levelled in the 57th minute when Chris Iwelumo headed over from point-blank range after beating the offside trap to Gudjonsson's free-kick.
City did equalise five minutes later with Chris Greenacre's fifth goal of the season.
Brynjar Gunnarsson's ball into the box took a fortunate deflection off James O'Connor and Greenacre was on hand to bury a low shot from 12 yards.
Derby held their nerve and regained the advantage in the 73rd minute after Stoke somehow survived an incredible goalmouth scramble. Kinkladze this time curved his corner from the left and Luciano Zavagno emerged from a ruck of players to net a flashing header from ten yards.
Stoke were almost on terms again when Marc Goodfellow's header was well saved by Lee Grant, but Morris secured a deserved victory in the last minute.
Strike partner Christie supplied the pass and Morris steadied himself before lashing in an unstoppable left-foot shot from the edge of the penalty area.
Stoke boss Tony Pulis said: "The players have worked their socks off and I couldn't have asked for anymore. All teams lose games and the important thing is how we bounce back."