Stanley, who opened their League Two campaign with a 3-1 win over Colchester on Saturday, went ahead through defender Ben Richards-Everton in the 20th minute.
Preston, under new boss Alex Neil and on the back of a 1-0 home league win over Sheffield Wednesday, equalised through Jordan Hugill in the 70th minute.
Jordan Clark looked to have won it for Stanley with just four minutes left, only for Hugill to strike again with 90 minutes up.
However, there was still time for substitute Kee to find a winner, converting Tom Dallison’s cross to secure a memorable victory.
Che Adams netted a hat-trick as Birmingham swept into the second round with a 5-1 win over Crawley.
David Davis and s ubstitute Robert Tesche were also on target while Panutche Camara netted a late consolation for Crawley.
Bristol City made it two wins in a row when they coasted past League One side Plymouth 5-0 at Ashton Gate.
Jens Hegeler, Nathan Baker and Korey Smith put the Robins 3-0 up inside 20 minutes, Freddy Hinds slotted in a fourth after 39 minutes and substitute Jamie Paterson wrapped things up with 11 minutes left.
Grimsby’s clash with Derby was abandoned after just 19 minutes due to a waterlogged pitch at Blundell Park.
The Rams were leading 1-0 following a fifth-minute header by defender Richard Keogh before the game was temporarily halted after a downpour and then eventually called off by referee Trevor Kettle.
On loan Bristol City forward Shawn McCoulsky scored twice in the space of six second-half minutes as League Two Newport won 2-0 at League One Southend.
There was more late drama at Oakwell, where Ryan Hedges scored a winner deep into stoppage time as Barnsley beat League Two Morecombe 4-3.
Tom Bradshaw and Ike Ugbo put the Tykes ahead early on, with Sam Lavelle reducing the deficit just before half-time.
Bradshaw headed in a third at the start of the second half and after a penalty from Michael Rose and Vadaine Oliver’s late effort appeared to have sent the tie into extra time, Hedges had the final say.
Ipswich won 2-0 at Luton with a goal in each half from Republic of Ireland forward David McGoldrick, while Norwich saw off Swindon 3-2 at Carrow Road.
Tom Elliott scored twice as Millwall beat Stevenage 2-0 at the New Den and Nottingham Forest moved into the second round with a 2-1 home win over Shrewsbury.
QPR beat Northampton 1-0 with a first-half goal from Yeni Ngbakoto at Loftus Road, where the visitors had defender Leon Barnett sent off.
Liam Kelly scored twice in the closing stages as Reading beat Gillingham 2-0 at the Madejski Stadium, while a header from Nouha Dicko with 15 minutes left was enough for Wolves to see off Yeovil 1-0.
Fulham won 2-0 at Wycombe and Sheffield Wednesday coasted to a 4-1 home win over Chesterfield.