It left Rotherham suffering two defeats in a row for the first time this season as they look for a quick return to League One.
After a first half of grim football, Hereford broke the stalemate when they grabbed the vital winner five minutes from the break.
Hereford, who arrived two spots behind third-placed Rotherham, defended stubbornly as the home side's three inexperienced frontmen found it hard to cope.
But on the break Hereford earned the right to drop back even deeper by grabbing the vital goal they could protect.
Lee Collins burst down the right and his cross was rifled accurately to the front post.
Hooper reacted first and pounced on the ball to drill in a close range shot that keeper Andy Warrington managed to reach it but couldn't prevent from crossing the line.
Rotherham had been left frustrated as the visitors - boasting an impressive eight wins on the road - were happy to force the home side to shoot from distance.
Hereford had flashed a warning before the goal when Rotherham were forcing the pace but Simon Johnson was wayward with his final shot.
Rotherham manager Mark Robins brought on 11-goal leading scorer Derek Holmes for the second half and he caused the visitors immediate problems.
But only a tremendous save from Wayne Brown preserved the lead when he turned away a goalbound shot from Mills 20 yards out.
After 62 minutes Theo Robinson blew a glorious chance for a second goal when he found space and blazed wide with only the keeper to beat.
As the pressure mounted from Rotherham, Brown again produced a super save to beat away a shot from Mills.
The visitors broke again and Robinson came close to a second, but keeper Warrington dived full-length to deny him before the Millers struck the top of the woodwork twice in a matter of minutes before full time.