Jon Nurse scored the winning goal as Dagenham & Redbridge won promotion to League One following the 3-2 play-off final victory.
Dagenham twice took the lead through Paul Benson and Danny Green only to see Millers striker Ryan Taylor swiftly level on both occasions.
But Nurse's scruffy strike with 20 minutes remaining finally proved enough to see off Ronnie Moore's men and deny their manager a third promotion at the helm.
Just 10 years ago the club were playing in the Ryman Premier League - and John Still will now get a chance to test his managerial mettle in the third tier after victory in the biggest game in the club's history.
Taylor had already threatened with a pair of headers before Dagenham went close to one of the goals of the season on the half-hour mark.
Peter Gain fed Abu Ogogo on the right flank and when he crossed into the middle, French midfielder Romain Vincelot launched into an acrobatic overhead kick which goalkeeper Andy Warrington did superbly to parry away.
Benson closed in on the rebound but his effort was deflected over the top by Millers skipper Ian Sharps.
It was a stunning effort which brought the whole stadium to their feet - and Warrington was at it again minutes later.
Sharps tripped Nurse inside the 'D' and Green smashed a free-kick right through the wall which was destined for the bottom corner until Warrington's strong wrists diverted it clear.
The Daggers had their tails up and took the lead in the 38th minute through the prolific Benson.
Gain played in Damien McCrory on the left wing and when he crossed into the area, Benson showed his predatory instincts to kill the ball with one touch before curling a shot into the bottom corner with his second.
The Essex side were ahead for just 58 seconds though, as Taylor replied in the 39th minute.
A quick throw on the left was hooked in by Kevin Ellison and Taylor arched his back to head past Roberts at his near post.
Dagenham started the second period brightly and it was no surprise when they regained the lead in the 56th minute.
A long throw was not dealt with and when the ball landed back at Green's feet 25 yards from goal, he took a touch before thumping a low drive beyond Warrington and into the back of the net.
Rotherham had struggled to get going after the break but responded well to going behind.
Mark Lynch flashed a dangerous cross across the area and after Taylor failed to connect, midfielder Danny Harrison made contact beyond the far post but saw his effort strike the face of the crossbar.
The Millers were not to be denied, however, and levelled through Taylor again in the 61st minute.
Nicky Law broke free on the right and picked out Taylor in space by the penalty spot. He took his time before clinically dispatching a left-footed drive past Roberts and into the right corner.
Dagenham captain Mark Arber tested Warrington from a corner as Still's side again poured forward, and they went in front for the third time in the 70th minute.
Green's corner caused chaos in the penalty area and when Nurse mis-hit a shot goalward Ellison could only divert the ball home off his thigh.
Nurse was instantly replaced by Graeme Montgomery as the end-to-end second period refused to slow down.
Rotherham pressed forward in a desperate bid for a goal but Dagenham held on to cap a memorable day with a deserved triumph.
Wording: TeamTALK.com