After being beaten by Newcastle last time out, Garry Monk’s side had enough to get past the rock-bottom Millers and won it through first-half goals from Chris Wood and Souleymane Doukara.
They made hard work of it in the second half, though, and were hanging on at the end after Richard Wood’s late header.
The three points sent Leeds back into the top six and ended a run of three successive league defeats at the home of Rotherham, who always seem to raise their game in this fixture and were unbeaten against their West Yorkshire neighbours in 34 years.
This current crop appear on a one-way road to relegation, though, and, after Peter Odemwingie was sent off for a shocking elbow on Liam Cooper, they succumbed to a 13th league defeat of the campaign.
Boss Kenny Jackett is still waiting for his first win – the Millers have not been victorious since August – and, with his side already 11 points adrift of safety, he will surely soon turn his attention to preparing for League One next season.
Wary of their poor record against the Millers, Leeds made the best possible start by taking the lead in the 14th minute.
Some generous defending from right-back Stephen Kelly allowed Charlie Taylor to surge into the area and his cutback was drilled home by Chris Wood from close range.
It was almost 2-0 when Cooper headed just wide from a corner soon after as the visitors enjoyed a comfortable start.
For Rotherham, however, their evening then went from bad to worse. Having already lost midfielder Greg Halford to injury in the fourth minute they were then reduced to 10 men just before the half-hour when Odemwingie shamefully smashed Cooper with his arm in an aerial challenge.
Then, six minutes later, goalkeeper Lee Camp, their best player, also came off injured following an earlier challenge with Hadi Sacko.
It was little surprise when Leeds doubled their advantage deep into seven minutes of first-half injury time.
They finished off a period of pressure when Doukara completed a fine a sweeping team move by placing a low shot into the bottom corner.
Leeds fans hoping to see their side rack up a hefty score after the break would have been disappointed as they failed to test substitute keeper Lewis Price.
Kalvin Phillips shot wide from distance, Doukara drilled over and Chris Wood put a header wide as the Millers did at least put up some resistance.
In fact, much of the second period was played in Leeds’ half and the hosts set up an exciting finish when Richard Wood headed home from six yards. It was Rotherham’s first effort on target – in the 86th minute.
And four minutes later they could not have asked for a better chance to rescue a point.
A frantic goalmouth scramble which saw Rob Green bravely block Will Vaulks’ effort ended with Millers defender Dominic Ball inexplicably lashing over from inside the six-yard box.