Livingston scored five goals and Hearts’ Arnaud Djoum was sent off in the space of 14 minutes as the hosts thumped Craig Levein’s side at the Toni Macaroni Arena.
Hearts, who could have gone joint-top of the Premiership, were routed in West Lothian.
Craig Halkett scored a penalty before Hearts were reduced to 10 men when Djoum received a second yellow card.
Dolly Menga and Ryan Hardie, twice, scored before Shaun Byrne made it five.
Referee Nick Walsh had erroneously shown Hearts goalkeeper Zdenek Zlamal a second yellow card after giving away the initial penalty before correcting his mistake.
The result – Livingston’s biggest ever win in the top flight – means they move into fifth in the Premiership, while Hearts remain fourth, missing the chance to go level with Celtic at the top.
Livingston surge leaves Hearts red-faced
On paper this match-up never looked likely to be a goal-fest. Livingston’s success has been built on a rock-solid defence rather than attacking flair, and Hearts have struggled for firepower ever since Steven Naismith’s injury, scoring just four goals in the seven games since.
But after 70 predictably goalless minutes, the game was turned on its head.
It all started when Zlamal charged out to claim a cross, but got nowhere near the ball and cleaned out Halkett. The ever-impressive centre-half dusted himself down and calmly put his penalty straight down the middle.
Referee Walsh had shown Zlamal a yellow card, followed by a red, but realised the goalkeeper had not been booked. And then minutes later he showed Djoum a second yellow, though the Cameroon international looked to have got the ball.
If Hearts manager Craig Levein felt hard done by, along with the loss of centre-back Clevid Dikamona to injury in the first half, he could have no complaints about the way his side were torn apart thereafter.
Menga was the first to capitalise as he twisted and turned in the box unchallenged before slotting past Zlamal.
Then Hardie, still making his comeback from long-term injury, showed his lethal touch in front of goal, scoring with two similarly precise finishes from within the penalty area.
All of that happened in under 10 minutes, and Hearts would have been relieved to go more than five without conceding.
But sure enough Byrne would arrive in the box to punish them yet again after some brilliant work from Steven Lawless.
Livingston were playing their third game in six days but showed no sign of fatigue as they typically bustled around the pitch, never giving Hearts a second.
And they might have been clear even before the break, Zlamal denying both Halkett and Scott Pittman from close range, and Hardie hitting a post.
Hearts rarely threatened all evening. Demetri Mitchell curled a shot against the woodwork in the first half but in the end they were embarrassed.
It is back to the drawing board for Levein as his side search for their early-season form. But for Livingston and manager Gary Holt, this season just gets better and better.
‘Livingston a team of lions’- Analysis
BBC Scotland’s Brian McLauchlin at the Toni Macaroni Arena
The Livingston success story just keeps rumbling on, and this is turning out to be an incredible campaign following last season’s unlikely promotion.
From front to back they have a real team of lions who battle for every ball from the first minute until the last.
Celtic, Rangers, Hibernian and now Hearts have all failed to win in West Lothian.
For Hearts, Levein will be very concerned about how they capitulated in the second half, in what was without doubt their poorest 45 minutes since he decided to move back into the manager’s hot seat.
He will be desperate for a quick victory to keep them at the top end of the table, with some big games to come before the winter break.
But this was Livingston’s night and they more than deserve any celebrations they have before their next match, away to Hibernian next week.
- 31GallagherSubstituted forHamiltonat 86'minutes
- 11CaddenSubstituted forRobinsonat 68'minutes
- 45MengaBooked at 64minsSubstituted forSaundersat 82'minutes
- 1ZlamalBooked at 72mins
- 28DikamonaSubstituted forHughesat 25'minutes
- 17GaruccioSubstituted forLeeat 77'minutes
- 38MorrisonSubstituted forClareat 45'minutes
- 10Sutchuin-DjoumBooked at 74mins
- Nick Walsh
- Shots on Target
Match ends, Livingston 5, Heart of Midlothian 0.
Second Half ends, Livingston 5, Heart of Midlothian 0.
Foul by Steven Lawless (Livingston).
Michael Smith (Heart of Midlothian) wins a free kick on the left wing.
Steven MacLean (Heart of Midlothian) hits the bar with a right footed shot from the centre of the box.
Oliver Bozanic (Heart of Midlothian) wins a free kick in the defensive half.
Foul by Keaghan Jacobs (Livingston).
Substitution, Livingston. Jack Hamilton replaces Declan Gallagher.
Goal! Livingston 5, Heart of Midlothian 0. Shaun Byrne (Livingston) right footed shot from the centre of the box to the bottom left corner.
Foul by Declan Gallagher (Livingston).
Peter Haring (Heart of Midlothian) wins a free kick in the defensive half.
Foul by Declan Gallagher (Livingston).
Sean Clare (Heart of Midlothian) wins a free kick in the defensive half.
Delay in match Declan Gallagher (Livingston) because of an injury.
Substitution, Livingston. Steven Saunders replaces Dolly Menga.
Alan Lithgow (Livingston) wins a free kick on the right wing.
Foul by Steven MacLean (Heart of Midlothian).
Goal! Livingston 4, Heart of Midlothian 0. Ryan Hardie (Livingston) right footed shot from the left side of the six yard box to the bottom right corner. Assisted by Steven Lawless.
Goal! Livingston 3, Heart of Midlothian 0. Ryan Hardie (Livingston) right footed shot from the centre of the box to the centre of the goal. Assisted by Scott Pittman.
Substitution, Heart of Midlothian. Olly Lee replaces Ben Garuccio.
Goal! Livingston 2, Heart of Midlothian 0. Dolly Menga (Livingston) right footed shot from the centre of the box to the centre of the goal. Assisted by Declan Gallagher.
Delay in match (Livingston).
Second yellow card to Djoum (Heart of Midlothian) for a bad foul.
Dolly Menga (Livingston) wins a free kick on the left wing.
Foul by Djoum (Heart of Midlothian).
Goal! Livingston 1, Heart of Midlothian 0. Craig Halkett (Livingston) converts the penalty with a right footed shot to the bottom left corner.
Zdenek Zlamal (Heart of Midlothian) is shown the yellow card for a bad foul.
Penalty Livingston. Craig Halkett draws a foul in the penalty area.
Penalty conceded by Zdenek Zlamal (Heart of Midlothian) after a foul in the penalty area.
Substitution, Livingston. Scott Robinson replaces Nicky Cadden.
Corner, Livingston. Conceded by Michael Smith.
Foul by Michael Smith (Heart of Midlothian).
Keaghan Jacobs (Livingston) wins a free kick on the right wing.
Dolly Menga (Livingston) is shown the yellow card for a bad foul.
Christophe Berra (Heart of Midlothian) wins a free kick on the right wing.
Foul by Dolly Menga (Livingston).
Christophe Berra (Heart of Midlothian) wins a free kick in the attacking half.
Foul by Dolly Menga (Livingston).
Attempt blocked. Ben Garuccio (Heart of Midlothian) right footed shot from outside the box is blocked.
Foul by Ben Garuccio (Heart of Midlothian).