Twenty points in the first 19 minutes set up Melrose for their 11th league win on the spin in this cracking clash in Edinburgh.
Melrose took the lead in the third minute when centre Craig Jackson kicked a penalty.
A try by scrum-half Bruce Colvine then made it 8-0 and two further tries came in the 16th and 19th minutes.
The first try of the duo came after a flowing team move which started in their own half and saw winger Gavin Wood over, Jackson converting.
A cross-field kick into acres of space from stand-off Jason Baggott then saw centre George Taylor over for an unconverted effort.
Boroughmuir gave themselves a lifeline two minutes before the interval when second-row Callum Atkinson went over for a converted try.
In the second half it was a case of blink and you missed it, Boroughmuir scoring 26 points and Melrose 22 in a mad 40 minutes which included a yellow card.
For the victors, winger Patrick Anderson, Jackson and Baggott scored further tries, with Jackson adding seven more points with the boot.
Back-row Craig Keddie, winger Jordan Edmunds and replacements Euan McKirdy and Mark Hare scored tries to gain Boroughmuir a bonus point in defeat.