Danny Ward’s first-half goal proved decisive as Rotherham bagged their first Championship win of the season.
Ward sprung the offside trap and produced a measured finish on 32 minutes to turn the game in the hosts’ favour at the AESSEAL New York Stadium.
New Rotherham loan signing Izzy Brown had the first opportunity of the game but his shot on goal was blocked by Ryan Woods.
The visitors responded well, with Lasse Vibe only inches away from opening the scoring from Maxime Colin’s cross.
Brown should have opened his Millers account moments later after Vibe was robbed of the ball by the striker, who was clean through on goal. His side-footed effort was just touched on to the bar and over by goalkeeper Daniel Bentley, and Ward blasted over from the resulting corner.
Lewis Macleod then curled an effort just over the bar at the other end for the visitors.
The open game swung the way of Rotherham in the 32nd minute when Ward burst free from Scott Allan’s pass and slotted coolly past Bentley.
Ward almost got a touch on Jon Taylor’s cross for a second after Macleod’s shot was deflected by a diving block from Kelvin Wilson.
Scott Hogan threatened early in the second half for Brentford but his shot from Vibe’s ball was clawed out by Lee Camp.
Brentford substitute Sam Saunders then had an effort diverted into the hands of Camp via a deflection off Rotherham substitute Richie Smallwood.
The visitors then crafted a chance from the left with full-back Callum Elder crossing for Vibe, whose header just went over the bar.
The home side, who had been restricted to attacking on the counter, almost went ahead with a stroke of good fortune as Allan’s over-hit 30-yard free-kick cannoned off the crossbar thanks to the slightest of touches from Bentley.
Rotherham then had to survive a scramble in the box from a corner before former Miller Emmanuel Ledesma found Hogan, but the in-form striker headed just wide.
Woods tested Camp from distance but the goalkeeper was alert to the wet surface and pushed the ball behind for a corner.
Rotherham continued to hold out through the final stages with Wilson making a number of important clearances and interceptions.
Taylor almost made sure of the points in the dying stages for Rotherham but, after surging from midfield, his shot was diverted behind thanks to a tackle from John Egan.
Ledesma tested Camp in stoppage time but his shot was palmed away from goal.