The Owls are currently 13th in the Championship and are managed by Brian Laws, a former team-mate of City boss Stuart Pearce at Nottingham Forest.
Laws was in charge of Scunthorpe when City beat them 3-1 at the same stage of last season's competition.
City went on to reach the quarter-finals last term but missed out on a great opportunity to make the semis, losing at home to West Ham, who went on to lose the final on penalties against Liverpool.
City's visit to Hillsborough will be on the weekend of January 6th and 7th.
Elsewhere, United were drawn at home to Villa, while Macclesfield were handed a trip to Chelsea and Stockport will travel to Watford.
The biggest tie of the round sees holders Liverpool hosting Arsenal.