Jamie Lindsay's late winner spoiled Wayne Rooney's first match as Derby's permanent boss as Rotherham ended a run of seven away defeats.
Lindsay pounced from close range as the home defence failed to clear after Daniel Barlaser's free-kick hit the post.
The Millers had a goal disallowed in the first half when Richard Wood was ruled marginally offside after finishing neatly when played through.
Derby carried the greater goal threat with Jamal Blackman saving well from Lee Buchanan and twice denying Graeme Shinnie.
The pre-match talk was all about Derby after Rooney's appointment as permanent manager and retirement from an 18-year playing career, plus their ongoing takeover saga, but it was United who stole the headlines and leapfrogged their hosts into 22nd place.
The Millers had lost their previous eight visits to the Rams, but showed decent attacking intent in the first half while limiting the hosts' space and time on the ball.
Yet despite several promising positions for Rotherham, it was Derby who created the half's few goal threats, forcing Blackman to push away Shinnie's powerful drive and then turn Buchanan's fierce half-volley around the post.
Derby struggled to break down a disciplined Millers defence after the break, but gradually turned up the pressure, with Martyn Waghorn's deft finish just wide, and Shinnie forcing another good save from Blackman after good work from Jason Knight.
But it was Paul Warne's side who finished the stronger, with the Rams somehow clearing midfielder Lindsay's point-blank effort off the line.
Moments later Lindsay made amends by lashing in the winner after Michael Ihiekwe kept the ball alive from a Barlaser effort which struck the post.
The Rams - who have the Championship's worst home record of seven points from 12 matches - forced a series of late corners, but for the sixth time in eight matches they failed to find the net.
Derby boss Wayne Rooney:
"Today Rotherham outfought us. Our quality on the ball and our concentration levels weren't where they should be.
"Obviously, the preparations over the last few weeks have been hampered because of Covid, but that's not an excuse for today's result.
"We know we can play better than we did today, but I don't think we even deserved a point today. You understand players making mistakes, but hopefully it's a one-off and we can respond properly."
Rotherham manager Paul Warne told BBC Radio Sheffield:
"I'm really proud of the lads and I want to thank our staff because it was three hours of us lot clearing the snow yesterday just to let the lads train.
"We have been good in recent weeks, but been on the wrong side of a goal, so it was nice to come away with three points and be on the right side for a change.
"I thought we edged the first half and they edged the second, but a 1-0 away win is impressive, a clean sheet has cheered me up no end, and I thought Jamal was excellent in goal today."