The game burst into life towards the end of the first half when Sean Clare fired the visitors in front and Steven Naismith doubled their advantage five minutes later.
Jordan Jones pulled one back from the penalty spot before the break but Hearts held on to complete a Rugby Park double this season.