Middlesbrough knocked out Manchester City in the fourth round and will visit Emirates Stadium on the weekend of 14 and 15 February.
League One side Bradford City are rewarded for eliminating Chelsea with a home tie against Sunderland or Fulham.
The winners of the replay between Cambridge United and Manchester United will visit Preston or Sheffield United.
Crystal Palace will host either Liverpool or Bolton Wanderers, while there are all-Premier League ties between Aston Villa and Leicester City, and West Brom and West Ham.
After beating Rochdale on Monday, Stoke will visit Championship side Blackburn Rovers in the next round.
The final tie is an all-Championship affair between Derby County and Reading.
Reflecting on the draw, Match of the Day presenter Gary Lineker, who drew the balls on The One Show along with the programme’s co-presenter Alex Jones, said: “You would expect Manchester United ought to go through from their replay and then a game against a League One side would be a classic FA Cup tie.
“And if Sheffield United get through they will take some beating given how well they’ve done in getting to the semi-finals of the Capital One Cup.
“Bradford might have wanted something a little bit more exciting than Sunderland or Fulham but they’ll think they have half a chance and could go on to bigger and better things.”
Bradford defender Andrew Davies told BBC Radio 5 live: “It’s a fantastic draw. It’s good to have a home game and the fans will be right behind us. It’s exciting. I can’t see why we can’t get another win.”