Keeper Joe Wright was the star of the show, making one spot-kick save in normal time and then keeping out all three of the Leaholm penalties in the shoot-out.
The Scarborough League side had looked dead and buried at 2-0 down during a blood and thunder contest, but some smart substitutions from boss Ricky Greening helped them to battle their way back and clinch the cup success.
Little happened in the opening period of the game, apart from Leaholm snatching the lead just before the break when Edgehill failed to deal with a ball into the box and Jaime Nicholson nipped in.
The writing looked to be on the wall after an hour as the Beckett League champions doubled their lead through an emphatic far-post finish from Brad Lewis.
Greening threw on former Scarborough Athletic attacker Joel Ramm and dead-ball specialist Benny Davis after this and the pair teamed up to bring Edgehill back into the game.
Davis bent an inviting free-kick into the box and Ramm rose highest to flick the ball home, making it 2-1.
Then another former Boro man in Gary Hepples benefited from a second Davis set-piece, the combative midfielder sweeping home to level the scoring.
The joy was soon dampened when a mix-up at the back led to the referee awarding Lealholm a penalty. But Wright was up to the challenge, brilliantly palming the ball away.
Edgehill must have thought they'd won the game with seconds left on the clock when Gary Hepples pulled the trigger inside the box, but his effort clattered off the underside of the bar and was cleared to safety.
Things soon began to go wrong for Lealholm in the shoot-out, with Wright getting his safe hands to all three kicks to keep them out, while Callum Myers, Davis and Ramm kept their nerve to seal the silverware.