Craig Levein’s Jambos will take on West Super League side Auchinleck Talbot at Tynecastle Park, while Neil Lennon’s Hibs will host League One Raith Rovers at Easter Road.
Hearts defeated Auchinleck 1-0 in Scottish Cup in 2012 thanks to goal from Gordon Smith – the last time the Jambos won the tournament.
Hibs last played Rovers in the Scottish Cup in 2016 on the way to winning the trophy when Darren McGregor and Dominique Malonga were on target in a 2-0 win at Stark’s Park.
The ties are due to be played on the weekend of February 9.
Full draw: Ross County v Inverness; Hibs v Raith; Kilmarnock v Cowdenbeath or Rangers; Hearts v Auchinleck Talbot; St Mirren v Dundee United; East Fife v Partick Thistle; Aberdeen or Stenhousemuir v Dundee or Queen of the South; Celtic v St Johnstone.