Oldham made it six wins on the bounce in League One and the FA Cup thanks to a goal from the in-form Chris Porter.
Porter struck at the end of the first half for his 13th of the season before Oldham's defence earned all three points with a powerful display.
Crewe, despite being by far the highest scorers in the division, could create little danger up front and managed only one shot on target all night.
They put up a decent battle in the second half but Oldham centre back Sean Gregan, on loan from Leeds United until the start of next month, had an outstanding game.
Porter had the chance to score before he eventually hit the winner, starting when he headed a free-kick from Neal Eardley over the bar.
Striker Paul Warne was also off target with a shot from just outside the box before Porter slid wide after a header at the far post from Andy Liddell.
Crewe's Rodney Jack, who had an unhappy spell with Oldham two years ago, missed his team's only chance of the first 45 minutes and visiting keeper Stuart Tomlinson kept them on level terms when he denied Gary McDonald.
Tomlinson also made a fine save from Porter but he was helpless just before the break as Oldham's leading scorer latched on to a header from Gregan and raced clear to score with his left foot from 12 yards.
Luke Varney sliced wide for Crewe after half-time but Porter sent another opportunity wide of goal after creating it all for himself.
Crewe were improving, especially after sending on Luke Rodgers as a substitute, and they finally got a clear sight of goal with ten minutes left.
Defender John Otsemobor delivered a cross from the right and substitute Michael Higdon placed his near post header across the keeper, only for Les Pogliacomi to make an excellent save to his right.
That was the best Crewe could manage despite some late pressure and Oldham almost increased their lead when midfield man McDonald burst into the penalty area but could not produce a cool finish.