Bryan Mbeumo scored the only goal as Brentford stretched their unbeaten run to 10 games and maintained their momentum heading towards the play-offs.
Mbeumo struck for the second time in two games with a flick header from a Sergi Canos cross, from eight yards, to seal the Bees’ first home win in five games.
Ivan Toney, captaining the Bees for the first time, had another good game but failed in his quest to equal the Championship’s individual season scoring record – hitting the post from one of his five attempts on goal.
Relegation-threatened Rotherham battled hard without much threat as the Bees ran out winners, and equalled last season’s points total of 81 in the process.
Brentford made five changes from the side which won at Bournemouth, with Charlie Goode, in his first start since December, Mads Bech Sorensen, Saman Ghoddos, Emiliano Marcondes and Mbeumo coming in for Christian Norgaard, Mathias Jensen, Tariqe Fosu, Marcus Forss and the suspended Pontus Jansson.
After a lively start, it was Rotherham who had more of the chances in the first 20 minutes, but it was Brentford who took the lead, thanks to good work by Canos and opportunist finishing by Mbeumo.
Although ex-Bee Chiedozie Ogbene had a header saved a minute later, the goal inspired the Bees, who then took control. Canos was denied by Millers goalkeeper Jamal Blackman, before in first half stoppage time Toney, captaining the side for the first time, came agonisingly close to doubling the lead when he ran through, only to see his shot crash back off the post.
Early in the second half, Blackman saved a header from Toney who later shot past.
Young substitute Mads Bidstrup, on his home debut, drove over in the 80th minute and 60 seconds later Marcondes was denied by a flying save from Blackman, while Marcus Forss drove past in the dying seconds.
Rotherham did not force David Raya into a save in the second half until the third minute of stoppage time when he held a header from Michael Ihiekwe on the line.
And although the scoreline does not show it, it was a comfortable win for Brentford.
Brentford: Raya, Goode, Pinnock, Sorensen, Roerslev, Janelt (Jensen 89), Ghoddos (Forss 74), Marcondes, Canos (Fosu 74), Mbeumo (Bidstrup 74), Toney.