The Spireites went ahead in the 10th minute when Dean Morgan volleyed home Drew Talbot's cross, but Wednesday were level just two minutes later after Neil Mellor stroked into an empty net following some dawdling defensive play from the visitors.
Both sides had chances in a frantic end-to-end affair, with Mellor being denied by Tommy Lee when through on goal, while Craig Davies' low effort was palmed away by Nicky Weaver and Morgan also had two efforts ruled out for offside.
Mellor crashed a shot into the bar as the second half continued in the same manner, before Davies looked to have sent Chesterfield through as he took advantage of some poor Wednesday defending to curl home a delightful winner in the 83rd minute.
Again though, Chesterfield were unable to hold their advantage for long as Wednesday drew level five minutes later after Marcus Tudgay scored the rebound of his saved penalty, which came after Giles Coke was felled by Derek Niven, sending the game to penalties.
It was an epic shoot-out, with both keepers making several fine saves, and after Weaver had sent his spot-kick crashing into the roof of the net, he watched on as his counterpart Lee blasted wide to seal an 8-7 victory for the Owls.