When Boroughmuir’s impressive winger Jordan Edmunds went over for his second try of the day midway through the second half, it put the Meggetland men 20-16 to the good at BT Murrayfield.
However, Heriot’s rallied and replacement Charlie Simpson scampered up the wing from his own half and exchanged passes with fellow sub Iain Wilson before diving over with stand-off Stuart Edwards converting.
A fourth Heriot’s try then came for the aforementioned Wilson before replacement hooker Sean Crombie’s second try for Boroughmuir in the 75th minute made it 28-25, but Heriot’s held on.
Steve Lawrie, the Heriot’s assistant coach, said: “We played some good stuff in patches and the guys dug in when Boroughmuir fought back.
“The tries by Charlie and Iain were very good team tries and I think the squad has come together nicely over the summer.
“There are still a lot of things to work on, but there were some big plus points. Obviously the boys will always remember winning a trophy at Murrayfield and now we have to refocus ahead of our first BT Premiership match against Currie this coming weekend.”
Heriot’s took the lead in the fourth minute when new recruit John Semple kicked a penalty.
Two minutes later Boroughmuir were back on level terms thanks to a penalty from stand-off Chris Laidlaw.
Semple then kicked another before the game burst into life when centre Liam Steele scored a well-worked try for Heriot’s.
A fast-paced try by Edmunds for ‘Muir meant that Heriot’s were 11-8 up at the break.
Four minutes into the second half Heriot’s got their second try, a good forwards drive seeing hooker Michael Liness going over on his debut.
Crombie, the former Edinburgh Rugby man who returned to ‘Muir over the summer, then got himself on the scoresheet with Laidlaw converting to leave them just a point behind.
That was before the four tries in the final quarter and then there was late drama when Boroughmuir replacement prop Dale Robertson had the ball dislodged from his hands as he spun towards the try line in the closing moments.
The former Lasswade man was agonisingly close to grabbing the glory, but it was not to be as Heriot’s added another trophy to the cabinet.