Boro had endured a five-game winless run ahead of their trip to the New York Stadium and made a terrible start when Angus MacDonald headed the hosts ahead from a corner.
Yet Boro took control when Rotherham’s Matt Crooks was sent off midway through the first half following a collision with Grant Hall.
The visitors then drew level when George Saville fired the ball home from a short corner, before Chuba Akpom scored his first goal since January to put his side ahead in the second half.
Boro also handed a debut to midfielder Connor Malley, who replaced Hall and impressed with his range of forward passing.
Fulham loanee Neeskens Kebano was also a constant threat for Warnock’s side.
Here’s how the Teessiders fared at the New York Stadium.