The sum dwarfs the £500,000 fine imposed on Scots-born Peter Cummings, a director of its parent company HBOS, by the Financial Services Authority (FSA), which led the inquiry.
The City watchdog spent £1.4m in internal fees while another £4m went on payouts to external companies in the investigation.
Mr Cummings, from Dumbarton, ran the Bank of Scotland corporate business that was hit with billions of pounds of losses when the property market crashed and was criticised by the FSA for failing to "exercise due skill, care and diligence".
Losses incurred by his division were partly responsible for the bank having to be bailed out by the taxpayer at the height of the financial crisis in 2008.
A report on the FSA's probe into the collapse of Bank of Scotland's parent HBOS, which led to a Government-brokered rescue takeover of the Edinburgh-based institution by Lloyds TSB, has yet to be published. In written evidence to the Parliamentary Commission on Banking Standards, the FSA said it took action against Mr Cummings because he personally approved high value loans and his pay was tied to the profitability of the division.
"The board placed significant reliance on Mr Cummings's experience and expertise as a corporate banker, and Mr Cummings's status as the highest paid member of the board reflected this," the FSA said.
Following the merger in early 2009, the combined Lloyds Banking Group took £7 billion of losses on HBOS's corporate book and the FSA said Mr Cummings was "clearly the most culpable senior manager for the corporate division's failings".
It considered action against others in the bank but was concerned it would be unable to prove personal liability.
Mr Cummings said he was a scapegoat for the banking crisis. He retired in 2009. After being hit with the fine, the executive – who left with a £352,000 a year pension – said: "This is tokenism at its most sinister, and has made it feel throughout like institutional oppression."
Stewart Hosie MP, the SNP's finance spokesman, said: "I'm not surprised costs were so high because these are complex legal matters and it's right that the FSA spent what it did to ensure the job was done properly."
Contextual targeting label: