Two goals from Matt Smith and one from Reece Wabara were enough to give the Latics a dramatic 3-2 win over Brendon Rodgers' Liverpool at Boundary Park.
And their reward was a plum home tie against another Merseyside giant.
The fifth round draw also rewarded non-league Luton with a home tie against Millwall and Leeds, who beat Tottenham 2-1 on Sunday, will travel to take on reigning Premier League champions Manchester City.
Fifth round draw in full:
Huddersfield Town or Leicester City v Wigan Athletic
MK Dons v Barnsley
Oldham Athletic v Everton
Luton Town v Millwall
Arsenal v Blackburn Rovers
Manchester City v Leeds United
Manchester United v Reading
Middlesbrough v Brentford or Chelsea
Ties to be played the weekend of 16/17 February.