Lee Hughes made amends for a missed penalty in normal time to score the decisive penalty in the shoot-out.
The Oldham striker shot straight at Sam Russell in the 22nd minute after Rory McArdle was deemed to have fouled Dean Smalley in the area.
Oldham were down to 10 men on the stroke of half time after Craig Davies headbutted Nathan Stanton.
But Oldham had to rely on penalties to dispatch their north west neighbours and progress to the next round.
Rochdale: Russell, Ramsden, Stanton, McArdle, Kennedy, Higginbotham (Toner 100), Jones, Keltie, Rundle (Thorpe 112), Dagnall, Shaw (Le Fondre 62). Subs Not Used: Spencer, Wiseman, Lambert, D'Laryea.
Oldham: Crossley, Eardley, Hazell, Gregan, O'Grady (Alessandra 67), Smalley (Stam 58), Allott (Liddell 120), Whitaker, Taylor, Davies, Hughes. Subs Not Used: Fleming, Stephens.
Sent Off: Davies (45).
Booked: Hazell, Taylor.
Att: 5,786
Ref: Colin Webster (Tyne & Wear).
What are these?
Bookmark with:
What are these?