The game exploded into life after ’Well – managed by Stephen Craigan – had won a 19th minute free-kick when Dom Thomas’s surging run down the right ended with him being fouled.
Thomas’s resultant delivery was spilled by Hearts keeper Kelby Mason and ’Well forward Dylan Mackin gleefully shot home.
Hearts almost equalised on 34 minutes when Russell McLean shot into the side netting at the back post after a Liam Smith cross.
But the young Steelmen were celebrating just three minutes later when Chris Cadden’s low shot was deflected in off a Hearts defender to make it 2-0.
Hearts pulled a goal back in controversial circumstances on 42 minutes when a soft looking free-kick was awarded on the edge of the box for a challenge on McLean and Jordan McGhee shot the setpiece into the right corner.
Hearts’ Smith was then booked for a foul on Mackin in the final action of the first half.
The Steelmen – backed by a boisterous travelling support in the 2769 crowd – went 3-1 up on the hour mark after man of the match Thomas had won a corner after brilliantly beating two men on the right.
When the resultant flag kick was swung over by Thomas, it reached David Ferguson at the back post and he smacked the ball home before celebrating in front of the Motherwell supporters.
Motherwell keeper Brett Long saved a Buchanan shot before Hearts did make it 3-2 on 65 minutes when Dario Zanatta shot home after dispossessing Ben Hall.
Zanatta shot over on 67 minutes before Mackin was booked for fouling Buchanan a minute later.
Motherwell killed off the match by scoring two more goals of outstanding quality.
Substitute Robbie Leitch shot home brilliantly on 74 minutes before fellow sub Dylan Falconer chipped home the goal of the night from Leitch’s pass at the death.
The victory is ’Well’s first major cup triumph since the senior side’s memorable Scottish Cup success of 1991.