Danny Hylton's hat-trick saw Aldershot reach the FA Cup fourth round for the first time since the club reformed in 1992 with victory over Rotherham.
The striker was in fine form, scoring with a close-range effort, a header and a low drive to put the hosts 3-0 up.
Lee Frecklington did pull one back for the Millers from the penalty spot after Shots defender Ben Herd handled.
Both sides finished with 10 men, away defender Kari Arnason seeing red before Hylton was sent off shortly after.
Arnason's red was for a second bookable offence while Hylton was dismissed for an alleged elbow on Jason Taylor.
VIEW FROM THE DRESSING ROOM
Aldershot Town manager Dean Holdsworth told BBC Surrey:
"It's not just about the performance it's the way we went about our business today, the preparation was vital for us.
"The players are playing with confidence and that showed today.
"You don't beat Rotherham without playing with confidence, passion and desire and we've had all that today.
"We're playing against some very good players and you know they are going to give their manager everything and we needed to be exactly the same and we did today."