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 means Livingston move into fifth in the Premiership, while Hearts remain fourth, missing the chance to go level with Celtic at the top.
More to follow.