Kilmarnock striker Cillian Sheridan scored his first senior hat-trick to punish Hearts at Tynecastle for a lack of composure in front of goal.
Hearts winger Arvydas Novikovas shot over the bar and Callum Paterson twice spurned first-half headed chances.
But Sheridan was much more assured, his header on 32 minutes leaving Hearts goalkeeper Jamie MacDonald helpless.
The Irishman added two after the break with a cool finish and a tap-in before Marius Zaliukas headed a consolation.
Sheridan's hat-trick was Kilmarnock's first since Kevin Kyle's against Falkirk in April 2009.
Hearts felt they should have been awarded a penalty in the early stages when Paterson was sent sprawling under a challenge by Kilmarnock captain Manuel Pascali.
However, referee Bobby Madden was not convinced.
Hearts began the game much the better side and Novikovas was the first to try his luck.
Ryan McGowan drove down the left and cut the ball back into the box but the Lithuanian winger blasted over from 14 yards.
Hearts' 17-year-old striker Paterson then passed up two glorious chances to fire his team in front but on both occasions failed to find the target.
Kilmarnock were soaking up the pressure and their defence line of Ryan O'Leary and Michael Nelson looked rock solid.
The visitors then took the lead with 13 minutes left in the first half.
James Dayton made headway down the left and his cross into the box was met by Sheridan who sent a glancing header into the corner of the net.
The goal stunned the home crowd who certainly let their feelings be known from the stand.
Kilmarnock doubled their advantage five minutes into the second half.
Sheridan looked offside when he collected the ball on the touchline before charging into the box and firing the ball underneath the body of MacDonald.
The Hearts players protested but referee Madden was having none of it and the goal stood.
And the 600 or so Kilmarnock fans were in full voice as Sheridan notched his and the team's third of the afternoon on the hour mark.
The home defence failed to deal with a cross at the back post and unmarked Sheridan had a simple task to tap the ball into the net.
Hearts huffed and puffed and Zaliukas pulled one back with three minutes remaining when he headed Danny Grainger's corner into the roof of the net.
It was all too little, too late, though, for Hearts and the visitors held on with ease.