Latics will travel to Ipswich Town in the opening round proper of the 2021/22 Emirates FA Cup.
The draw took place live on ITV on Sunday afternoon and sees Keith Curle's side, who were ball number 30, play against the Tractor Boys at Portman Road and a match against former Latic George Edmundson.
Following this weekend's fourth round qualifying ties, clubs from League One and Two enter this stage of the competition, with a chance of being paired with the 32 non-League clubs who progress from the qualifying rounds.
The first round proper will be held between Friday 5 and Monday 8 November, with winning clubs getting £22,629 from the competition prize fund.
Further fixture and ticket information will be communicated in due course.