John Grant turned in one of Lewis Chalmers' long throws to give Aldershot the lead and then headed home Scott Davies' corner to make it 2-0.
Rotherham responded and substitute Jamie Clarke nodded home, but Aldershot, who dumped the Millers out of the FA Cup in November, held out for their third away win of the season.
Robins said: "We are talking about a defeat when we should be talking about a victory.
"If we had defended properly against two set-pieces we would have won the game. If we had taken the eight or nine clear-cut chances we had we would have won the game.
"But we lacked a cutting edge and a clinical finish. It is disappointing and baffling because we have been defending so well and those two set-pieces apart we defended well again."