Rotherham’s good league form and impressive start to the FA Cup campaign did not translate to a victory on the south coast.
Danny Hylton scored a hat-trick for Aldserhot to end a run of five straight away wins for the Millers, who had accounted for League One sides Stevenage and Notts County in the earlier rounds.
Hylton put the Shots 2-0 up with goals in the sixth and 23rd minutes.
And midway through the second half, Hylton completed his hat-trick to put the game beyond Rotherham’s reach.
With 19 minutes remaining Lee Frecklington - who secured a permanent deal at Rotherham in the week - pulled a goal back for the Millers from the penalty spot.
But any hopes Rotherham had of rescuing their FA Cup hopes were extinguished when Kari Arnason was sent off for Steve Evans’s side after a second bookable offence.
To complete a crazy day, Hylton was then sent off for Aldershot.
Evans said: “If you make bad individual errors you’ll get punished.
“Whether it’s a league club or a non-league club when Nardiello jumps out of a tackle and then for the second goal there’s two mistakes with Pringle not tracking a runner and Bradley getting the wrong side of his man.
“I think in the second-half we dominated the game.”