Sam Finley scored the winning penalty to take Stanley through to the last eight of the Leasing.com Trophy.
In a dramatic night at Highbury, the midfielder fired home Stanley’s fifth penalty after Fleetwood’s Paddy Madden had missed their first.
It need a Ross Sykes 89th minute goal to take the game to sudden death after Fleetwood had come back in the second half following Joe Pritchard’s first half strike.
It means Stanley will earn £40,000 and will now wait for Thursday’s draw, which isn’t regionalised.
John Coleman made three changes from Stanley’s last game while Joey Barton made six changes to his Fleetwood line-up.
Joe Bursik was the first keeper in action, doing well to keep out a Josh Morris strike.
Stanley grew into the game but the windy conditions meant that chances were at a premium.
The Reds took the lead on 35 minutes when Dion Charles played the ball in from the right wing, Offrande Zanzala couldn’t make a firm connection in the six yard box and the ball fell to unmarked Pritchard at the far post who fired home from close range.
It was his second Stanley goal since signing from Bolton in the summer.
Morris had another chance immediately after Stanley’s goal but his effort was narrowly wide.
After the break, the Reds started well but then Fleetwood made a chance count on 50 minutes.
A quickly taken short corner to Morris was fired into the box and the ball evaded everyone and ended up in the back of the net.
Stanley tried to get their noses back in front, Pritchard playing a good cross into the box which Zanzala just couldn’t get a touch on at the far post.
Then, on 68 minutes, Fleetwood were awarded what was felt a soft free kick in a dangerous position 20 yards out.
Danny Andrew seized the opportunity with a perfect set piece to give Barton’s side the lead.
Stanley pressed, Coleman putting on Wilson Carvalho, Erico Sousa and Harvey Rodgers as the Reds looked to take the game to penalties.
There was a real goalmouth scramble four minutes from the end from Sousa’s ball in but Fleetwood somehow managed to clear the danger as the ball bobbled around the box.
Then Fleetwood almost scored a third to make the game safe for them but the hero was Bursik who made a superb save to deny top scorer Paddy Madden who was clean through.
It ended up vital as, in the final minute of normal time, Carvalho's strike hit a Fleetwood player and bounced into the path of defender Sykes who rifled the ball into the net and went to celebrate with the visiting fans.
And Sousa could have won it with the final touch of added time but his chipped effort hit the crossbar and it went to spot kicks.
Goalkeeper Bursik took the first penalty against Alex Cairns and scored.
Stoke loan keeper Bursik then went into the goal and Madden blazed Fleetwood’s first over the bar.
Pritchard made it 2-0 to Stanley before Andrew scored his spot kick, 2-1.
Jerome Opoku calmly slotted home the third for Coleman’s men and Conor McAleny fired home for Fleetwood.
Charles scored Stanley’s fourth before Harrison Biggins found the roof of the net to make it 4-3 to the Reds.
Finley stepped up to take the winner and kept his nerve to be the spot kick hero.