David Norris' fourth goal of the season booked Town a place in the next round of the Carling Cup after extra-time.
The skipper followed up his brace in the first round win at Exeter with a left foot screamer on the 100 minute mark to edge an entertaining encounter at Gresty Road and give Blues a fourth win in five games.
Town fans got their first look at Jason Scotland following his arrival from Wigan on Monday, while Brian Murphy produced two outstanding saves in the Blues' goal.
Town boss Roy Keane made four changes from the team that won at Crystal Palace at the weekend. Murphy replaced Marton Fulop while Tamas Priskin, Troy Brown and Shane O'Connor were all handed starts.
Patrick Ada headed over in the first opening for Crewe, who put seven goals past Barnet on Saturday. Norris responded with a right foot effort wide, Grant Leadbitter then testing Rhys Taylor in the home goal with a drive from distance. Luke Hyam also forcing the 'keeper into action from even further out.
Leadbitter picked up a yellow card before O'Connor saw a left foot drive goes just wide as Blues threatened an opener in a first-half of neat football but few clear cut openings.
Carlos Edwards had the best effort of the opening 45 minutes with a strike against the post as the half came to a close witrh honours even.
Scotland was given his Town debut in the second-half, coming on for Hyam at the break as Blues switched to a 442 formation.
Gareth McAuley and Norris couldn't get on the end of an excellent cross by Edwards as Town pressed for an opener, Scotland then seeing his first effort in a blue shirt blocked by David Artell.
Edwards failed to get any purchase on his shot after latching on to an excellent pass from Leadbitter, the Trinidad international then reversing the assist role but Leadbitter failed to hit the target.
Town made a double change on the hour with Ronan Murray and Jaime Peters introduced for Edwards and Darren O'Dea, O'Connor dropping in at left-back.
Luke Murphy fired wide for Crewe before Norris picked up his fourth yellow card of the season for a foul on Clayton Donaldson, Tommy Smith cautioned soon after for a foul on the same man.
Murphy showed good awareness to cancel out the threat from Donaldson, plunging at the striker's feet as the game entered the final 20 minutes.
Joel Grant smashed a shot high and wide as Crewe matched Town blow for blow, O'Connor then becoming the fourth Blue to see yellow.
Priskin set up Scotland with a neat exchange of passes but the Trinidad international was held up by Artell, Priskin then forcing Taylor into a save at full stretch.
Murray linked up well with Scotland and Priskin but saw his shot cannon back off the defender as extra-time beckoned while at the other end it needed a top class save from Murphy in the Town goal to keep out Shaun Miller's effort.
Miller made way for Byron Moore before extra-time kicked off and the substitute made an instant impact with a run and strike that produced a brilliant save from Murphy at his nearpost.
Good work by Murray created an opening for Priskin, Taylor making the save while Murphy was quickly off his line to kill the danger presented by Moore, the 'keeper then doing well to gather from Bell's cross.
Norris had a shot deflected wide by Ada after Smith and Scotland were both denied in a scramble but the skipper wouldn't be denied and his left foot strike left Taylor with no chance five minutes before the break.
Crewe made a final change with Grant making way for Danny Shelley before the second-half of extra-time got underway.
Donaldson had a great chance to level the scores immediately after the restart but couldn't find the net from six yards, McAuley then doing well to head clear from Bell's cross as Town held out for a place in Saturday's third round draw and a spot in the record books with the side winning the first four away games for the first time in the Club's history.
Crewe: Taylor, Tootle (Mitchel-King, 42), Artell, Ada, Blanchett, Bell, Westwood, Murphy, Miller (Moore 90), Donaldson, Grant (103). Subs not used: Fogler, Leitch-Smith, Connerton, Dugdale. Booked: Murphy.Town: Murphy, Brown, McAuley, Smith, O'Dea (Peters 60), Edwards (Murray 60), Hyam (Scotland 46), Norris, Leadbitter, O'Connor, Priskin. Subs not used: Eastman, Healy, Fulop, Lambe. Booked: Leadbitter, Norris, Smith, O'Connor.