The Tangerines emerged victors in a remarkable nine-goal extravaganza at New Victoria Park, Newtongrange.
By Peter Rundo
Indeed, United relinquished a two-goal lead before hitting back to run out convincing winners.
The visitors went ahead after 12 minutes when Conor Townsend, making his return from injury after seven weeks, played a one-two with Blair Spittal who subsequently fired home from 12 yards.
And on 27 minutes, they extended their lead when Ola Ademeyo was brought down in the box by keeper Jack Hamilton who, despite getting his hand to Aidan Connolly’s penalty, couldn’t keep it out.
On the stroke of half-time, Hearts pulled one back when Angus Beith scored from the spot after Robbie Buchanan had been tripped by John Souttar.
Galvanised by that goal, Hearts started the second half on the front foot and within 11 minutes were ahead.
With five minutes gone, Nathan Flanagan's brilliant shot from the edge of the box levelled.
Then on six minutes, Liam Henderson's angled effort put the Jambos in front.
Only two great saves by Michal Szromnik prevented Hearts increasing their lead.
But United regained a grip on the game when a first time shot from just outside the box took a wicked deflection to loop over the keeper after 76 minutes.
A couple of minutes later Ola Ademeyo side-footed home a Spittal pass.
Then, with ten minutes left, John Souttar fired high into the net after the Hearts defence failed to clear their lines.
Ademeyo completed the scoring in 87 minutes with a surging run before drilling home from just outside the box.
Dundee United: Szromnik, Wilson, Townsend, Butcher, J Souttar, Spark, Connolly (Lochhead 83), S Smith, Ademeyo, Telfer, Spittal (Coote 83).
Substitutes not used: Zwick, Harwood, , B Smith, Montgomery, Coote.