The Staggies were the better team in the first half and struck the woodwork twice before the break.
But the hosts, relieved still to be on level terms, stepped things up after the interval and got themselves two goals in front before Jordan White hit back to set up a tense finale.
“In the first half, we showed the rustiness of coming into competitive games from pre-season,” said Hearts boss Robbie Neilson, whose team begin their European campaign next month.
“One of the plus sides of being in Europe is you can build into pre-season. But one of the down sides is you’re not involved in the Premier Sports Cup, which I think is a great cup because you can come in and play four games and it’s competitive.
“And I just felt the first half we didn’t have that competitive edge we needed, that energy to break forward.
“The second half was miles better after we spoke to them.”
Moira Gordon was at Tynecastle and rated the Hearts players out of ten ...