Richard Cockerill’s team were the odds-on favourites to join Leinster in the Dublin final next Saturday and looked to be on course as they scored three times through Stuart McInally, Darcy Graham and Chris Dean.
The last touchdown left Madigan with a tricky conversion out wide which he nailed to level the scores going into the final minute.
But a Mike Willemse fumble handed Madigan another kick at glory, which he took to fire Ulster into their first final in seven years.
Cockerill had insisted his side were the underdogs – but they were firmly in control for 40 minutes.
Duhan Van Der Merwe had been urged by Cockerill pre-match to get himself involved more in the action after a series of lacklustre displays.
The message was taken on board by the former South Africa schoolboy international, who charged at the visitors at every opportunity.
But there was no-one there from Ulster to plug a big gap on the short side two minutes later as Edinburgh skipper McInally peeled off the back of a line-out ruck before flopping over for the opening points.
Jaco Van Der Walt’s conversion skewed wide before Ulster mounted three swift counter surges as they looked to hit back immediately.
They were repelled on each occasion by a dark blue wall – a pattern that would be repeated more than once before the break.
— RugbyPass (@RugbyPass) September 5, 2020
But the first half was just as much about Edinburgh’s dominance in defence – with McInally, Watson, Magnus Bradbury and even Graham producing big interventions – as it was about Ulster’s inability to capitalise at the vital moment in attack.
The second half got off to another sloppy start for the Belfast outfit as Billy Burns’ up-and-under sliced off the outside of his boot to put his side under pressure again.
And Edinburgh took advantage to score again after 47 minutes. The forwards did the grunt work before Chris Dean fed Van Der Walt, with the stand-off shrugging away Burns’ tackle to put in Graham to the score.
Van Der Walt added the extras but the deficit was cut back to five within seven minutes as the hosts’ resistance was finally broken when Lyttle danced in off his line to dot down under the posts for a try converted by Burns.
By this point, the game was resembling a basketball match.
Dean crossed over after Watson had bulldozed into the red zone – but this was the last time Edinburgh would have any control over matters.
Again Ulster hit back just past the hour mark, with hooker Herring barging over from close range.
With their lead cut to seven, Edinburgh were now wobbling. A defence that had been rock solid before the break was creaking and McFarland’s men took advantage as Andrew squeezed over from a mighty line-out drive.
Madigan had it all to do with the conversion out wide but slotted over to square things up.
But with extra-time looming, Edinburgh substitute prop Willemse knocked-on to hand Madigan his shot at glory.
Sign up to our mailing list for a weekly digest from the wide world of rugby.Sign Up Now