The game will be played on Saturday 28th July with a 3pm kick off and replaces the game against Everton which was on / off / on / off.
Speaking to the clubs official website themillers.co.uk boss Steve Evans was looking forward to the game; "We're delighted that the centre-piece of our pre-season will see us look outside the box, to play what is now the biggest challenger to the title in Scotland," he said.
"Hearts have always been the biggest challenger to the Old Firm, right back to when I played, and with the recent events at Ibrox, this firmly puts them as the second biggest club in the country. It's an honour to have them coming here, they will bring a good travelling support and provide excellent competition."
Meanwhile, he still hoped to face Everton sometime in the season; "It was commonly known amongst everybody, including myself that we were going to have a full-strength Everton side coming here, but they have been given a fantastic opportunity to go to Indonesia, but I am sure we will see David Moyes' side here before the end of the year," Steve said.