An early penalty from McKenzie Kirk gave the young Jam Tarts the lead after Finlay Pollock was fouled in the penalty box.
The game was put out of sight in the 68th minute when substitute Callum Hambrook capitalised on a defensive error to fire the ball high into the roof of the net.
However, the visitors had to survive a scare in the first half when the hosts had the ball in the back of the net. The equaliser was initially given but, after the protests of the Hearts players, the referee disallowed it for offside – a decision which appeared to be the correct one.
Hearts will now enter the draw for the quarter-finals. They are the first team in the hat with the majority of the other ties – including Lothian Thistle Hutchison Vale hosting Hibs at Ainslie Park – being played over the weekend.
Coach John Rankin was pleased his players were able to advance to the next round and gain some experience from which to learn, though he wasn’t overly enamoured with the performance.
He told The Future Is Maroon: “It’s not the style we would have liked to have got to the quarter-finals but none the less we got the job done.
“In our players development this is a great experience to have to go to Inverurie and play difficult opposition and experience different preparation.”