A well-taken Paul Dickov goal and a superb Robbie Savage free-kick put Derby in charge but Rangers were the superior side and were level two minutes after half-time through Adel Tarrabt and skipper Gavin Mahon.
Jay Simpson put the visitors ahead before a late penalty by Akos Buzsaky sealed a third straight win for Jim Magilton's classy team.
Derby lost Dean Leacock with mumps, taking the list of absent first-teamers to nine, but it was the home side that struck first in front of the live television cameras.
The visitors were caught napping when Savage took a quick free-kick and sent in Dickov who swept a first-time shot past Radek Cerny from 15 yards.
Cerny prevented his team going further behind in the 18th minute when he made a stunning one-handed reaction save to keep out Rob Hulse's header after Gary Teale had crossed from the left.
Rangers had lost some of their early poise but they came close to equalising in the 21st minute when Alejandro Faurlin curled a free-kick from 20 yards into the side-netting.
Derby were still creating the better chances and, on the half-hour, Hulse headed over from ten yards but the home side did extend their lead six minutes later when Savage swerved a 20-yard free-kick in off a post.
Rangers had to reply before half-time and they did so in the 40th minute when Tarrabt conjured up another superb free-kick from 25 yards to beat Stephen Bywater.
It was all-square two minutes into the second half when another sweet passing move ended with Wayne Routledge setting up Mahon to score from six yards.
Derby's defence had been opened up too easily and they sliced apart again in the 59th minute when Simpson powered past Shaun Barker and Paul Connolly to score his sixth goal of the season.
Buzsaky almost scored a fourth on the break in the 74th minute and, although Hulse blazed wide from an inviting position, Buzsaky drove in a 90th-minute penalty to settle the game after Dean Moxey had pushed Routledge over.