After a quiet opening to proceedings, the Millers, who made five changes from their weekend win at Brentford, took the lead in the 17th minute with Joe Skarz's cross unfortunately striking Chris Smith and diverting past Michael Ingham, who was rooted to the spot.
York were unlucky not to restore parity prior to the break as Elliott Whitehouse and Ryan Jarvis both went close with headers.
The hosts did have the ball in the net before half-time but Wes Fletcher's strike was ruled out for offside after he reacted quickest to Adam Collin's parried save from Ashley Chambers' effort and Pablo Mills also cleared a header off the line.
But the League One side gave themselves a two-goal cushion in the 63rd minute as Kieran Agard sent Ingham the wrong way from the penalty spot after Lewis Montrose had brought him down.
Six minutes later the visitors put the result beyond doubt when Alex Revell rose highest in the penalty area to power a header home from Richard Brindley's pinpoint cross.
York: Ingham, Davies, Smith, Parslow, Fletcher (Cresswell 70), Chambers (Bowman 70), Jarvis, Montrose, Platt (Murray 76), Whitehouse, O’Neill. Unused- Clay, Allan.
Millers: Collin, Brindley, Skarz, Mills, Frecklington, Revell, Hylton, Pringle (Milsom 90), Morgan (Rowe 87), Agard (Bradley 90), Tidser. Unused- Shearer, O’Connor.
Crowd: 2,372 (529 away)
Read more at http://www.themillers.co.uk/fixtures-results/match-report/?matchid=3672612&tcmuri=1065261#QXV4TvqsVTD2IyQV.99
Source: PA