Goals from Andrew Shinnie and Chris Burke saw the Millers recover from Liam Mandeville’s opener for Rovers, with Burke’s winner coming three minutes from time.
There were a number of senior professionals in the side which was watched by boss Neil Warnock. The likes of Lewis Buxton and Aïmen Belaïd were both given a start along with a host of youngsters.
In the opening stages Shinnie gave a warning of what was to come with a shot on the half volley which fell narrowly wide. Kuda Muskwe was next to go close for the Millers but his rasping drive was palmed away by Marco Marosi.
Shinnie’s 19th minute effort also went close before Burke’s shot rolled just wide of the post as the Millers turned the screw.
Despite the Millers’ pressure it was Rovers who took the lead. Mandeville fired in a shot which beat Alex Cairns after a clever quick free-kick.
The Millers equalised four minutes later when Shinnie showed great balance to cut inside before sailing a left-footed shot into the top corner.
Muskwe was again denied before the break as the Millers created another good opportunity.
In the second half a Shinnie corner was headed just wide by Belaïd before Darnelle Bailey-King was denied by a good challenge when sprinting towards goal.
Muskwe was close again when his fierce drive beat sub ‘keeper Louis Jones but flashed wide of the far post.
Before the end Bailey-King again showed his pace after he raced clear of the defence, but he fired his effort over.
With 87 minutes on the clock the Millers grabbed a deserved winner when Burke broke clear of the Rovers defence, before calmly slotting the ball into the corner beyond Jones.
Rotherham: Cairns; Buxton, Peace-McDonald, Belaid (Smalley 63), Rose; Burke, Potts (Wiles 85), Dawson, Bailey-King (Redmayne 89); Shinnie; Muskwe.
Subs not used: Bilboe, Adeyemi
Doncaster: Marosi (Jones ht), Fielding (Walker 36), Carberry, Linley, M'Buti, Williamson, Whitehouse (Henderson 79), Parkin, Pugh, Mandeville, Longbottom.
Subs not used: Barker, Wanless.