Cancer Research's site at 44, 45 and 46 Lincoln's Inn Fields had been earmarked for luxury residential development by the Candy brothers and Tony Pidgley, among others, and is thought to have been sold for £75m to LSE.
In 2016 Cancer Research will move to the Francis Crick Institute in King's Cross, which is due to open in 2015. The charity will plough funds raised from the Lincoln's Inn sale into this scheme, as well as into its research.
It was thought a £500m residential scheme on the site could be developed, totalling at least 200,000sq ft and creating more than 150 luxury homes.
Christian Candy's CPC Group is believed to have agreed heads of terms to buy it, but it was ultimately outbid by LSE. Calliard Homes and Berkeley Group are also understood to have bid.
Most of Lincoln's Inn Fields - London's largest square - is in the London borough of Camden. However, the south side is in Westminster, where traditionally it has been easier to obtain consent for residential schemes.
One point of contention that affected the site's value centred on whether residential buyers would gain planning consent from Westminster City Council, which is taking a tough stance on office-to-residential conversions.
LSE, whose property investment activities are overseen by senior governor Nigel Hugill, now has almost total ownership of the southern edge of Lincoln's Inn Fields.
Martin Elmer, property director at Cancer Research UK, said: "we're delighted to be selling our laboratories at 44 Lincoln's Inn Fields to the London School of Economics.
"Some of the proceeds will go towards our contribution to the Francis Crick Institute, the remainder will go towards our lifesaving work on cancer."
One source said the deal was designed to "future proof" LSE in case of future expansion needs. In October 2010, it bought the Land Registry Office building in central London for £37.5m.
Allowing Cancer Research's properties to go to residential use would have ruled out an LSE purchase.
Gryphon Property Partners is believed to have handled the sale but would not comment.
Source: Nick Johnstone, Property Week