RBS, a bank majority-owned by the taxpayer, disposed of the A-listed Georgian property for over £1.8m following criticism that its initial purchase was a sign of the institution's profligacy.
MPs welcomed the sale.
RBS was one of the world's biggest companies until a series of calamitous decisions, including the ill-fated £47bn takeover of Dutch bank ABN Amro, led to its collapse in 2008.
The previous Labour government rescued RBS with a £45bn bailout, with the taxpayer eventually controlling an 82% stake in the bank.
In 2009, the Sunday Herald revealed that, despite the huge injection of public money, RBS was holding on to a lavish Edinburgh townhouse purchased three years earlier for £1.6m.
The property at 44 Heriot Row - one of the Capital's most exclusive streets - was for the sole use of the then chairman Sir Tom McKillop when was in Edinburgh.
The townhouse was empty when McKillop was not in the Capital.
It boasted five double bedrooms, three bathrooms, a dining room, drawing room and a living room.
Extensive renovations were also pushed through after the purchase, according to Edinburgh city council planning documents.
Critics described the property as "extraordinarily excessive" and a "prime candidate for cost-cutting".
After this newspaper broke the story, an RBS spokesperson said the bank would look at all options for the property, including disposal.
It can now be revealed that bank bosses subsequently sold it for £1,885,000 - a gain of nearly £300,000.
Sources believe the sale should be seen in light of the bank's radical downsizing.
Around 40,000 jobs have been lost at the bank since the bailout, with thousands more posts expected to be axed.
It was reported last month that the bank, still majority owned by the taxpayer, was likely to make losses of up to £8bn for 2013.
Branches have also been closed.
As a result the bailout, RBS went from having a reputation for excellence to becoming a byword for financial incompetence.
Cathy Jamieson, Scottish Labour's Treasury spokesperson, said: "We can only hope that these highly-paid bankers can get by without their luxury Edinburgh pad when they visit the city.
"This is a classic example of the excesses of the banking industry gone out of control and at a time when the people who bailed out the banks face a cost of living crisis, it is only common sense that the bankers do without these luxuries.
Scottish Liberal Democrat MP Mike Crockart said: "It's good news for the taxpayer that RBS has seen sense and sold what could only be seen as the world's most flamboyant government-owned bachelor-pad. As the bank gets back on its feet the taxpayer needs to see less penthouses and more profits."
An RBS spokesperson said: "The new management at RBS quickly decided that this property was no longer required and it was sold in 2010. This sale was part of a much wider review of all our property assets worldwide."