First-half goals from Mike Hall and Isaac Sinclair sent AFC through to the last 16 of the Hallmark Security League First Division Cup.
Their mid-table visitors from First Division South had won their last two league games, scoring six goals.
Missing a number of regulars, AFC boss Dave Worthington included some inexperienced players, with new signing Cian Menzies among the substitutes.
Stockport started the stronger but AFC grew into the game and opened the scoring in the 37th minute. They won a free-kick just outside the area and defender Hall curled his shot into the net.
It got even better for AFC in stoppage time as Sinclair ran across the box to double the home side’s lead.
Early in the second half, Hall had another opportunity from a free-kick in a similar position but shot just over.
AFC never seem to allow themselves a relaxing finish and Stockport halved the deficit with 10 minutes remaining.
A superb free-kick from out on the left by Matt Hanson flew past keeper Alex Cameron. However, AFC saw out the match to reach the third round.
Worthington said: “I thought we just about deserved the win. We had our best spell in the last 25 minutes of the first half and deservedly went into the break in the lead.
“We asked the lads to kick on in the second half and I felt we were in control but we let them back into the game.
“What is pleasing is that we held out for the win, which we’ve not been brilliant at since I’ve been at the club”
AFC return to league action at Bacup Borough on Thursday.
Blackpool: Cameron, Donaghy, Hall, Mottram, Vaughan, Pickering, Dickson, Baird, Bradley, Sinclair, Thomason; subs: Betteridge, Menzies, Bishop, Finlayson, Taylor