Andrew McMillan, 94, who lived in Lanark, was educated at Sedbergh, a private school in Cumbria where annual fees begin at £22,000.
Mr McMillan held the title Baron of Cleghorn and had a lifelong interest in history, heraldry, armoury and tradition and was a member of numerous European orders.
His will has revealed he had an estate worth a total of £3,970,495.71 by the time of his death in January.
The accountant never married and was looked after by a team of carers in his later years. His will has revealed he ordered his former housekeeper Agnes McPate be given £10,000 and her daughter Lyn McCammon, who took over her job, be given £20,000. He also left £5000 to his current gardener, Joe McBride.
Peter Marshall, bursar and clerk to the governors at Sedbergh, said: "He was a great friend of the school and had strong relationships with many senior staff that were built up over the years.
"He travelled extensively and insisted he had visited every country in the world bar three. He had a huge slides collection and that has formed part of his legacy to the school."
Mr McMillan's home was valued at £295,000, while a second property he owned in nearby Carluke was worth £250,000. His barony was worth £50,000 and his personal belongings, including furniture, coins, jewellery and watches, were valued at £268,745.
However, the bulk of his wealth was held in a stocks and shares portfolio worth more than £2.9m.