The upper tier judge Lord Doherty dismissed the appeal against a first-tier tax tribunal (FTT) decision in the so-called ‘Big Tax Case’, although he has referred several issues back to the original panel.
HMRC argued that payments made to players and other employees should be taxable but the Murray Group, who formerly owned Rangers, argued they were loans.
The FTT issued a 2-1 majority verdict which favoured, in principle, the Murray Group in November 2012, and ordered that HMRC's £46.2m demands, about three-quarters of which referred to the liquidated club, be "reduced substantially".
The upper-tier appeal has largely upheld that verdict but some payments will be re-examined by the original tribunal, including termination and "guaranteed bonus" payments.
The judgement, which has no impact on the current Rangers regime, reads: "The appeal is dismissed except in so far as it relates to the termination payments.”
In 2000 Rangers began making payments through an Employee Benefit Trust (EBT), which was set up by major shareholder Murray International Holdings (MIH).
But in 2010 the Glasgow club confirmed they were under investigation by HMRC over offshore payments to players and the case played a part in Rangers entering administration in February 2012.
Oldco Rangers was liquidated in June of that year and Charles Green's Sevco Scotland company had to re-launch the club as a new company.
But in November Oldco Rangers won their first-tier tax tribunal appeal in principle against HMRC's demands over EBT payments.
Following the latest ruling, a spokesman for Murray International Holdings said: “We are satisfied that the UTT (upper tier tribunal) has now published its widely awaited decision and note the contents thereof.
"We are pleased with the judgement which again leaves negligible tax liability and overwhelmingly supports the views collectively and consistently held by our advisers, legal counsel and MIH itself.
"The decision substantially reduces HMRC's claim in the liquidation of the old Rangers Football Club.
"While we have been successful in both the FTT and UTT, there are, as we have stated previously, no victors.
"It is obvious that the much publicised existence of these proceedings overshadowed Rangers Football Club for many years and tarnished the external perception of its value.
"There can be little doubt that despite favourable legal opinion, potential acquirers were therefore dissuaded from pursuing their interest during a period in which we were marketing the sale of MIH's shareholding.
"The case has also stimulated extensive press and social media comment, discussion and speculation, a significant quantity of which has been ill informed.
"Notwithstanding all of this, it is abundantly clear that Rangers Football Club would not have gone into administration or liquidation had the purchaser fulfilled its contractual obligations and responsibilities.
"Similar to the resolution of the UTT appeal, we hope that the relevant authorities conclude their investigations and commence proceedings at the earliest opportunity."