Rotherham twice came from behind through Ryan Taylor, but lost to a deflected goal from Jon Nurse in the 69th minute.
The defeat, in front of a crowd of 32,054, consigns Ronnie Moore's Millers to another season in League Two.
Following an enterprising opening that Taylor twice go close with headers, the Londoners began to settle and Paul Benson and Danny Green both forced Andy Warrington into fine saves.
It was Benson who opened the scoring on 38 minutes when turned unopposed in the penalty area and curled a shot beyond Warrington.
But within 60 seconds the Millers were level as Taylor met Kevin Ellison's left-wing cross with a powerful header at the front post.
An action-packed second half burst into life when Danny Green drilled dagenham in front from the edge of the penalty area.
But once again Rotherham struck back quickly. Nicky Law was released down the right flank and his pull back was controlled by Taylor who lashed the ball beyond 40-year-old goalkeeper Tony Roberts.
But Dagenham had the final and decisive say when Nurse put them ahead for a third time with 21 minutes remaining, when he met a right-wing corner with a shot that found the net courtesy of a deflection off Ellison.
Rotherham: Warrington, Lynch, Gunning, Fenton, Sharps; Mills, Law, Harrison, Ellison; Taylor, Le Fondre. Substitutes: Green, Warne, Marshall, Broughton, Walker, Bell-Baggie, Annerson.
Dagenham: Roberts, McCrory, Doe, Arber, Green, Nurse, Ogogo, Vincelot, Gain, Scott, Benson. Substitutes: Lewington, Uddin, Currie, Montgomery, Bingham, Tejan-Sie, Walsh.
Follow the goals go in with Match Centre, and for a full report, analysis, reaction and pictures, read Sports Monday inside tomorrow's Yorkshire Post.
This season the Yorkshire Post has an exciting new match-day service, called Match Centre. Here you will find minute-by-minute updates, stats and team formations. Plus reports from every game in England, from the Premier League down to the Blue Square Premier.
Simply select your game from the pull down menu, then click on the 'i' information button on the right of the fixture and it will give you access to everything you need to know about your team.
So if you can't make it to a game, head for the Match Centre and we will give you the best seat in the house. Click the link below.
For the latest team news, score and commentary from your team check out our new Match Centre