The Spireites battled to a 1-1 draw in 90 minutes at Boundary Park and will now face Sky Bet League Two rivals Fleetwood for a place at Wembley.
Lee had also played a starring role in the 90 minutes as he rescued Chesterfield with a string of second-half saves.
Earlier, League One Oldham went in front midway through the first half when David Mellor crossed to Danny Philliskirk, who produced a smart turn and finish for his ninth goal of the season.
But Chesterfield levelled after 28 minutes, with Tendayi Darikwa heading in from close range after Talbot's excellent first-time cross.
Chesterfield's success was the perfect response to their weekend FA Cup defeat by Southend and Cook said: "I'm delighted for everyone at the club.
"People can't wait to fire bullets and we got some stick after Saturday, but the players were terrific.
"We were up against a really bright side who are going to be a threat to everyone, but we are into an area final and that's exciting.
"It certainly excites me as a manager because people sometimes forget that the staff here are also young and we are still learning our trade.
"In the second half we ran out of ideas a bit, but we are through on penalties and all very much looking forward to the challenge against Fleetwood.
"We are struggling for numbers at the moment, but this is a night to remember. We are second in the league and into an area final, so the season isn't going too badly."
- Sports & Recreation
- Drew Talbot
- Anton Rodgers
- Danny Philliskirk
- David Mellor