The Hammers were booed off on Wednesday night after letting in a late goal for the third match running at Upton Park.
Danny Hylton's strike ensured the League Two Shots reached the second round for the first time since they reformed in 1992.
Allardyce, who says his players are scared of playing at home, made nine changes including a debut for 19-year-old centre-half McNaughton.
And all looked well when Junior Stanislas fired them into the lead with a superb curler after a quarter of an hour.
But their night, and in particular McNaughton's, went sour when he was sent off for scything down Hylton a minute after half-time.
It leaves Allardyce still searching for an elusive first home win as Hammers boss.
But he said: "We didn't get our first win because we went down to 10 men, it's as simple as that.
"Even if the opposition are not in the same division it gives them a massive lift.
"We were nice and comfortable but unfortunately a young man on his debut gets caught out and gets sent off.
"By the letter of the law the referee has seen it as a goalscoring opportunity, he's last defender so he has to do what the rules tell him.
"In the end we tried to go for the win, I didn't want extra time.
"It's not the same as 11 versus 11. I think we would have won the game."
Aldershot turned up in east London without a point or a goal from their last three matches.
So it was almost inevitable to see them equalise in the 75th minute when stand-in Hammers keeper Ruud Boffin blocked Alex Rodman's shot and the rebound landed kindly for Luke Guttridge to tuck away.
And with two minutes of normal time remaining, a goalmouth scramble saw the ball fall to Hylton 18 yards out and he drove a low, angled shot past Boffin and into the net to send the away fans wild.
Aldershot can now add their names to the likes of Grimsby, Northampton, Wrexham and Oldham as lower-league teams to knock the Hammers out of a cup on their own turf.
The result was sweet for their manager Dean Holdsworth, a self-confessed West Ham fan who played under Allardyce at Bolton.
"I'm delighted for the players, for the fans and for the club," he said.
"West Ham put a strong side out and we gave a good account of ourselves.
"I think the world of Big Sam, but this is about my team tonight. It's the best feeling I've had since becoming a manager."